Allow users to backup/restore folder...

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
tjo.mobile
Posts: 18
Joined: Tue Oct 25, 2016 8:09 pm

Allow users to backup/restore folder...

Post by tjo.mobile » Tue Oct 25, 2016 8:20 pm

I have an app that stores data in files in a folder called 'locations" in the "documents" folder on Android, accessed with the code below.

Code: Select all

set the defaultFolder to specialFolderPath("documents") &"/locations"
I am wondering what the easiest/best way is to allow users to back up and restore this folder. The user cannot navigate to this folder unless they have a rooted device, so they need a way to do this using the app itself. I would like the user to have a way to export the "locations" folder and upload it to dropbox, google drive or even send it as an email attachment.

Is there a way for the app to copy the folder to a location that the user can navigate to on an Android device without root access? It is my understanding that apps are typically limited to only writing to the apps home folder.

Thanks for any suggestions or advice,

TJ.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Allow users to backup/restore folder...

Post by Klaus » Sat Oct 29, 2016 1:11 pm

Hi TJ,

1. welcome to the forum! :D
2. I don't develop for mobile (I don't even own a cellphone or something, yes, that's me :D )
but I would ZIP the complete content of the docs folder and mail it to the user.


Best

Klaus

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Allow users to backup/restore folder...

Post by MaxV » Mon Oct 31, 2016 11:36 am

Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

tjo.mobile
Posts: 18
Joined: Tue Oct 25, 2016 8:09 pm

Re: Allow users to backup/restore folder...

Post by tjo.mobile » Wed Nov 02, 2016 7:24 pm

Thank you both for your advice. I think the mnt/sdcard is what I was looking for!

Cheers!

Post Reply