Creating desktop or client-server database solutions?
Moderators: Klaus, FourthWorld, heatherlaine, robinmiller, kevinmiller
- Posts: 11260
- Joined: Sat Apr 08, 2006 8:41 am
- Location: Germany
From the dictionary about "documents folder":
On Android the documents folder property returns the path to a folder that can be used for per-application data files.
This property is read only and is equivalent to the specialFolderPath("documents") function.
I do not develop for mobile nor do I own any mobile device, so I would consider this either a BUG or a dcumantation flaw.
Sorry, have to pass this to real Android users.
- Posts: 2027
- Joined: Sun Sep 23, 2007 4:58 pm
/mnt/sdcard/ may get you to a publicly writeable folder. This isn't necessarily "The Documents" folder, and different devices may have different paths to the public location. I think /mnt/sdcard/ is simlinked a lot and will probably be the nearest thing to a universal location, whatever the local path on the device. It works on the few different devices I have tried. MaxV may know more?
Your app contains the sandboxed location found by specialFolderPath ("documents") and this is only writeable by your app. On first install, this folder is empty and will only ever contain something if your app specifically writes something there.
When you build the standalone, the files you include in the list in the tab of the standalone builder are included in the specialFolderPath("resources") folder. This is NOT a writeable location. If you want to use a database file you have included, you first have to copy it from the resources to documents folder. (Check if the file already exists in the destination though because otherwise on the second, third and every other launch it will overwrite the database with the empty one.)
- VIP Livecode Opensource Backer
- Posts: 5131
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
Try specialFolderPath("external documents") for the user-viewable folder on the public shared drive. Be sure in Android standalone settings you check "External storage". This special folder path was just added recently so if it doesn't work, make sure you've updated LC to the most recent version. I can't remember exactly which version first included it.
The original specialFolderPath("documents") is the app-specific documents folder that isn't visible in a file browser.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
- Posts: 1574
- Joined: Tue May 28, 2013 2:20 pm
- Location: Italy
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
- Posts: 19
- Joined: Sun Jan 07, 2018 8:48 pm
thanks to everybody!
specialFolderPath("External documents") works fine, but the update to the new version of livecode brought up another problem..