amiekuser
amiekuser

Reputation: 1630

Backing up databases in android cloud:

Can I use the Android Cloud to back up my application's databases? What are some limits to this feature?

Upvotes: 5

Views: 3593

Answers (1)

amiekuser
amiekuser

Reputation: 1630

I came across the solution. Apparently it was there in the dev guide.Thought I should put it here so that others can be benefited from it.

The BackupAgentHelper class has SharedPreferencesBackupHelper to backup SharedPreferences files. FileBackupHelper to backup files from internal storage.

So in order to back up a database we need to extend BackupAgent to Back up data in a database. 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.

Please visit this link for illustration: http://developer.android.com/guide/topics/data/backup.html#BackupAgent

Upvotes: 9

Related Questions