Cannot access Android Documents folder in Livecode new version

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
patrickshing
Posts: 6
Joined: Tue Apr 17, 2018 3:31 pm

Cannot access Android Documents folder in Livecode new version

Post by patrickshing » Wed Jul 21, 2021 3:23 am

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)

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm
Location: London, England

Re: Cannot access Android Documents folder in Livecode new version

Post by Bernard » Thu Jul 22, 2021 7:21 am

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?

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Cannot access Android Documents folder in Livecode new version

Post by jacque » Thu Jul 22, 2021 5:59 pm

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.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Android Deployment”