I tries to create a new folder in External storage SD Card. Using this code:
val folderMain = "NewFolder"
val f = File(Environment.getExternalStorageDirectory(), folderMain)
if (!f.exists()) {
f.mkdirs()
}
and this permission:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
But after executing this code It creates a new folder in Internal storage. Here is the screenshot of Internal Storage:
While External Storage has no new folder in it. Here is the screenshot of External Storage:
What should I do? I want to create a new folder in External storage By using Kotlin or java codes.