Since: API Level 8
package

android.app.backup

Classes | Description

Contains the backup and restore functionality available to applications. If a user wipes the data on their device or upgrades to a new Android-powered device, all applications that have enabled backup will restore the user's previous data.

All backup and restore operations are controlled by the BackupManager. Each application that would like to enable backup and preserve its data on remote strage must implement a backup agent. A backup agent can be built by extending either BackupAgent or BackupAgentHelper. The BackupAgentHelper class provides a wrapper around BackupAgent that simplifies the procedures to implement a backup agent by employing backup helpers such as SharedPreferencesBackupHelper and FileBackupHelper.

The backup APIs let applications:

  • Perform backup of arbitrary data to remote storage
  • Easily perform backup of SharedPreferences and files
  • Restore the data saved to remote storage

For a detailed guide to using the backup APIs, see the Data Backup developer guide.