I am trying to write a new folder in internal storage, however it's not created no matter what I do.
Here is the code I use:
File file = new File(path,"TestFolder");
file.mkdirs();
Log.e("file path","" + file);
The file output is /storage/emulated/0/TestFolder
which is the exact path I want to write the storage to, but it's not writing.
I added these permission in the manifest:
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
I also added this line android:requestLegacyExternalStorage="true"
in the <application>
tag.