Android Question Creating folder problem

Deef

New Member
Hi everyone,

I'm trying to create a folder in the "DirRootExternal".
I'm relatively new to writing code, and read multiple forum posts for errors i have encountered so far, but this one i cant seem to solve.

The app, once installed, asks for permission to give acces to photos, files etc.

As soon as i try the app in the emulator, everything works and the folder gets created. When
i install the app on my phone (Huawei Mate 20), i also give it permission, but it never creates the folder.

I've added the following line in the manifest editor:
AddManifestText(
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29" />
)

I (try) to create a folder (after permission granted) with:
File.MakeDir(File.DirRootExternal, "testfolder")

I hope someone can clarify what i'm dooing wrong here since it works in the emulator, but not on the phne itself.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…