Page 1 of 1

Allow users to backup/restore folder...

Posted: Tue Oct 25, 2016 8:20 pm
by tjo.mobile
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.

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

Posted: Sat Oct 29, 2016 1:11 pm
by Klaus
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

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

Posted: Mon Oct 31, 2016 11:36 am
by MaxV

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

Posted: Wed Nov 02, 2016 7:24 pm
by tjo.mobile
Thank you both for your advice. I think the mnt/sdcard is what I was looking for!

Cheers!