I'm fairly new to LC and I have not found a way to backup SQLite from the device. It would also be nice if Google cloud would backup the database with the application. Had user get a new phone and when they setup their new phone the app was installed without moving their data. Kind of useless to build an app when the data can't be backed up / moved.
Any recommendations would be much appreciated.
Backup sqlite on Android
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Backup sqlite on Android
Hi SChamblee,
LiveCode has got ftp working on mobile so you can upload via that.
Here are other methods;
http://forums.livecode.com/viewtopic.php?f=8&t=19144
Simon
LiveCode has got ftp working on mobile so you can upload via that.
Here are other methods;
http://forums.livecode.com/viewtopic.php?f=8&t=19144
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Backup sqlite on Android
Thanks I will have to see if I can get that working.
Re: Backup sqlite on Android
Read this page: http://livecode.wikia.com/wiki/Saving_files_on_Android
In order to backup your data just copy specialFolderPath("Documents") content.
In order to backup your data just copy specialFolderPath("Documents") content.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: Backup sqlite on Android
Thanks Max
Looks promising. Backup from the Document folder to the sdcard will be real nice, then the user could move the data easily to their computer.
Looks promising. Backup from the Document folder to the sdcard will be real nice, then the user could move the data easily to their computer.
Re: Backup sqlite on Android
With the information that Max provided and information from another post on this forum I got the solution.
put URL ("binfile:" & specialFolderPath("Documents") & "/myfile.sqlite") into URL ("binfile:" & "mnt/sdcard/myfile.sqlite")
This copy the file to the internal memory, I haven't tested put I believe you add the number 2 to the sdcard to write to the external sdcard.
Just incase anyone else needs to copy files
put URL ("binfile:" & specialFolderPath("Documents") & "/myfile.sqlite") into URL ("binfile:" & "mnt/sdcard/myfile.sqlite")
This copy the file to the internal memory, I haven't tested put I believe you add the number 2 to the sdcard to write to the external sdcard.
Just incase anyone else needs to copy files