Android.App.Backup Namespace

Contains the backup and restore functionality available to applications.

Remarks

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 can restore the user's previous data when the application is reinstalled.

For more information, see the Data Backup guide.

All backup and restore operations are controlled by the Android.App.Backup.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 Android.App.Backup.BackupAgent or Android.App.Backup.BackupAgentHelper. The Android.App.Backup.BackupAgentHelper class provides a wrapper around Android.App.Backup.BackupAgent that simplifies the procedures to implement a backup agent by employing backup helpers such as Android.App.Backup.SharedPreferencesBackupHelper and Android.App.Backup.FileBackupHelper.

The backup APIs let applications:

Classes

TypeReason
BackupAgentProvides the central interface between an application and Android's data backup infrastructure.
BackupAgentHelperA convenient Android.App.Backup.BackupAgent wrapper class that automatically manages heterogeneous data sets within the backup data, each identified by a unique key prefix.
BackupDataInputProvides the structured interface through which a Android.App.Backup.BackupAgent reads information from the backup data set, via its Android.App.Backup.BackupAgent.OnRestore(Android.App.Backup.BackupDataInput, System.Int32, System.Int32) method.
BackupDataInputStreamProvides an Java.IO.InputStream-like interface for accessing an entity's data during a restore operation.
BackupDataOutputProvides the structured interface through which a Android.App.Backup.BackupAgent commits information to the backup data set, via its Android.App.Backup.BackupAgent.OnBackup(Android.OS.ParcelFileDescriptor, Android.App.Backup.BackupDataOutput, Android.App.Backup.BackupDataOutput) method.
BackupFileTypeEnumerates values returned by several types and taken as a parameter of the Android.App.Backup.BackupAgent.OnRestoreFile member.
BackupManagerThe interface through which an application interacts with the Android backup service to request backup and restore operations.
FileBackupHelperA helper class that can be used in conjunction with Android.App.Backup.BackupAgentHelper to manage the backup of a set of files.
FileBackupHelperBaseDocumentation for this section has not yet been entered.
FullBackupDataOutputProvides the interface through which a Android.App.Backup.BackupAgent writes entire files to a full backup data set, via its Android.App.Backup.BackupAgent.OnFullBackup(Android.App.Backup.FullBackupDataOutput) method.
IBackupHelperDefines the calling interface that Android.App.Backup.BackupAgentHelper uses when dispatching backup and restore operations to the installed helpers.
IBackupHelperExtensionsDocumentation for this section has not yet been entered.
RestoreObserverCallback class for receiving progress reports during a restore operation.
SharedPreferencesBackupHelperA helper class that can be used in conjunction with Android.App.Backup.BackupAgentHelper to manage the backup of Android.Content.ISharedPreferences.