I have an app that works perfectly in Android 9 (<SDK29). Using the Content Chooser I can select any image in the gallery, get the filepath from the URI and copy to my apps folder. I can then delete the chosen file and 'rescan' the gallery to remove the thumbnail.
BUT, with Android 10 (SDK29) I get a permission denied error. The two lines below are from the log:
Any ideas on what I have missed?
Also how can we now, remove the the image/thumbnail from the gallery?
Thanks!
BUT, with Android 10 (SDK29) I get a permission denied error. The two lines below are from the log:
make file copy: /storage/emulated/0/DCIM/Camera/IMG_20200919_144433_760.jpg
I am using 'getsafedirs' in the code and have the 'Write External Storage Permission' in the manifest. I have tried with and without 'requestLegacyExternalStorage':file copy error: android.system.ErrnoException: open failed: EACCES (Permission denied)
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="29"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
AddManifestText(<uses-permission
android:requestLegacyExternalStorage="true"
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="29" />
)
Any ideas on what I have missed?
Also how can we now, remove the the image/thumbnail from the gallery?
Thanks!