I'm doing an app in which I'm trying to create the "Download / Datax" directory and write txt files to external SD memory and I'm using this code:
File directorioExt = new File( Environment.getExternalStoragePublicDirectory( Environment.DIRECTORY_DOCUMENTS ), "/Download/Datax/" );
if (!directorioExt.exists()) {
File directoriox = new File( Environment.getExternalStorageDirectory() + "/Download/Datax/" );
directoriox.mkdirs();
}
But it is not possible to create the directory in the external memory. I have also placed in the manifest:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
Can someone tell me how to achieve this?