My app needs targetSDK to be the latest 33, can't apply MANAGE_EXTERNAL_STORAGE permission, and also to work on Android 10 or newer phones with scoped storage enabled.

Neither the MediaStore API nor the SAF API seems to work, with the former not knowing how to implement it and the latter requiring manual creation by the user.

Can anyone give me an example? thank you very much!

1

There are 1 best solutions below

1
blackapps On

You can just use mkdir() and mkdirs() to do what you want in the classic way.

Also with SAF you can do it.