Page 1 of 1

Cannot access Android Documents folder in Livecode new version

Posted: Wed Jul 21, 2021 3:23 am
by patrickshing
We've had an Android app accessing files in the folder: /storage/emulated/0/Documents

When generated with Livecode 905, everything's fine.

When generated with Livecode 962, if we upgrade the new apk (did not remove the previous app), everything's fine, but if we remove the previous apk then install the new apk, we cannot access the folder!

Seems there's some system flag being set during the installing process to control the access of the Documents folder, how could we set this in Livecode new version?

(we've setup Android permissions for the external folders after all installations)

Re: Cannot access Android Documents folder in Livecode new version

Posted: Thu Jul 22, 2021 7:21 am
by Bernard
Perhaps there's a security enhancement in Android to prevent this? I can see why they might do that.

I Googled: storage/emulated/0 permission denied
and there were various people with permissions problems.

Have you upgraded Android Studio (or changed the API level) since your 9.0.5 app?

Re: Cannot access Android Documents folder in Livecode new version

Posted: Thu Jul 22, 2021 5:59 pm
by jacque
There's a special folder path you could try for that:

Code: Select all

specialFolderPath("external documents") 
Make sure you've set the entitlement in the Android standalone settings.

Android did get more restrictive about accessing files outside the app sandbox but see if that still works.