Kenny Root | 5a20ea1 | 2010-02-23 18:49:11 -0800 | [diff] [blame] | 1 | <HTML> |
| 2 | <BODY> |
Scott Main | d17da43 | 2010-04-29 21:42:58 -0700 | [diff] [blame] | 3 | <p>Contains the backup and restore functionality available to |
| 4 | applications. If a user wipes the data on their device or upgrades to a new Android-powered |
Scott Main | f4f05b8 | 2011-01-07 14:38:23 -0800 | [diff] [blame] | 5 | device, all applications that have enabled backup can restore the user's previous data when the |
| 6 | application is reinstalled.</p> |
Scott Main | 73e150c | 2010-09-20 14:11:18 -0700 | [diff] [blame] | 7 | |
Scott Main | f4f05b8 | 2011-01-07 14:38:23 -0800 | [diff] [blame] | 8 | <p>For more information, see the <a |
Scott Main | 9be0105 | 2012-06-22 12:35:08 -0700 | [diff] [blame] | 9 | href="{@docRoot}guide/topics/data/backup.html">Data Backup</a> guide.</p> |
Scott Main | b83a283 | 2010-04-29 13:26:53 -0700 | [diff] [blame] | 10 | {@more} |
Kenny Root | 5a20ea1 | 2010-02-23 18:49:11 -0800 | [diff] [blame] | 11 | |
Scott Main | b83a283 | 2010-04-29 13:26:53 -0700 | [diff] [blame] | 12 | <p>All backup and restore operations are controlled by the {@link |
| 13 | android.app.backup.BackupManager}. Each application that would |
kopriva | 7ecfe31 | 2018-09-17 15:17:50 -0700 | [diff] [blame] | 14 | like to enable backup and preserve its data on remote storage must implement a |
Scott Main | b83a283 | 2010-04-29 13:26:53 -0700 | [diff] [blame] | 15 | backup agent. A backup agent can be built by extending either {@link android.app.backup.BackupAgent} |
| 16 | or {@link android.app.backup.BackupAgentHelper}. The {@link |
| 17 | android.app.backup.BackupAgentHelper} class provides a wrapper around {@link |
| 18 | android.app.backup.BackupAgent} that simplifies the procedures to implement a backup agent by |
| 19 | employing backup helpers such as {@link android.app.backup.SharedPreferencesBackupHelper} and |
| 20 | {@link android.app.backup.FileBackupHelper}.</p> |
Kenny Root | 5a20ea1 | 2010-02-23 18:49:11 -0800 | [diff] [blame] | 21 | |
| 22 | <p>The backup APIs let applications:</p> |
| 23 | <ul> |
Scott Main | b83a283 | 2010-04-29 13:26:53 -0700 | [diff] [blame] | 24 | <li>Perform backup of arbitrary data to remote storage</li> |
| 25 | <li>Easily perform backup of {@link android.content.SharedPreferences} and files</li> |
| 26 | <li>Restore the data saved to remote storage</li> |
Kenny Root | 5a20ea1 | 2010-02-23 18:49:11 -0800 | [diff] [blame] | 27 | </ul> |
| 28 | |
Kenny Root | 5a20ea1 | 2010-02-23 18:49:11 -0800 | [diff] [blame] | 29 | </BODY> |
| 30 | </HTML> |