0

I'm trying to teach myself how to use Android's BackupRestore service to back up my app's sqlite database, but I can't find any example code on how to properly extend BackupAgent or BackupAgentHelper, so I'm a little lost...

I looked at http://developer.android.com/resources/samples/BackupRestore/src/com/example/android/backuprestore/ExampleAgent.html but am uncertain as to how to apply this example to backing up a sqlite db file...

Does anyone have any example code for backing up an entire sqlite database (the onRestore and onBackup methods), or any ideas about resources (other than the BackupRestore docs - I've looked through those extensively and they're difficult for me to understand).

HitOdessit
  • 7,198
  • 4
  • 36
  • 59
Colleen
  • 23,899
  • 12
  • 45
  • 75

1 Answers1

0

This example code seem's pretty documented. Have you looked through this yet?

http://developer.android.com/resources/samples/BackupRestore/src/com/example/android/backuprestore/BackupRestoreActivity.html

Woody
  • 363
  • 2
  • 14
  • Sorry, should have been more specific-- I need to know how to extend BackupAgent.. similar to http://developer.android.com/resources/samples/BackupRestore/src/com/example/android/backuprestore/ExampleAgent.html but for a sqlite db file. – Colleen May 04 '12 at 03:41
  • Did you ever find an example or succeed at backing up/restoring SQLite db? – Phil O Feb 29 '16 at 14:53