Search code examples
androidcordovamobileandroid-backup-service

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.


Solution

  • 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.