Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Backup Cordova App Using Android Backup Service

Does Google's Android Backup Service (http://developer.android.com/google/backup/index.html) backup hybrid mobile app data such as sqlite databases and localstorage?

I have a cordova app that I am looking to add a backup solution to. It would be very handy if this service was plug and play with cordova apps.

like image 924
Charles Avatar asked Jan 15 '15 00:01

Charles


2 Answers

It appears like the Android Backup Service is not plug and play with sqlite databases. I found this under the Extending BackupAgent section http://developer.android.com/guide/topics/data/backup.html#BackupAgent:

If you have an SQLite database that you want to restore when the user re-installs your application, you need to build a custom BackupAgent that reads the appropriate data during a backup operation, then create your table and insert the data during a restore operation.

like image 96
Charles Avatar answered Nov 06 '22 03:11

Charles


As far as i checked, there is one ready-made backup plugin available which should serve the purpose.

Even though the plugin developer claims that its untested, he managed to backup the data successfully once. And the plugin issue related to backing up the data is resolved in the SO Post. Hope it helps someone

like image 25
Gandhi Avatar answered Nov 06 '22 03:11

Gandhi