34 lines
2.0 KiB
Plaintext
34 lines
2.0 KiB
Plaintext
page.title=Backing up App Data to the Cloud
|
||
page.tags=cloud,sync,backup
|
||
|
||
startpage=true
|
||
|
||
@jd:body
|
||
|
||
<p>Users often invest significant time and effort creating data and setting
|
||
preferences within apps. Preserving that data for users if they replace a broken
|
||
device or upgrade to a new one is an important part of ensuring a great user
|
||
experience. This section covers techniques for backing up data to the cloud so
|
||
that users can restore their data.
|
||
|
||
<p>Android provides two ways for apps to backup their data to the cloud:
|
||
<a href="{@docRoot}guide/topics/data/autobackup.html">Auto Backup for Apps</a> and
|
||
<a href="{@docRoot}guide/topics/data/keyvaluebackup.html">Key/Value Backup</a>.
|
||
Auto Backup, which is available starting API 23, preserves app data by uploading
|
||
it to the user’s Google Drive account. The Key/Value Backup feature (formerly
|
||
known as the Backup API and the Android Backup Service) preserves app data by
|
||
uploading it to the <a href="{@docRoot}google/backup/index.html">Android Backup Service</a>.
|
||
|
||
<p>Generally, we recommend Auto Backup because it requires no work to implement.
|
||
Apps that target Android 6.0 (API level 23) or higher are automatically enabled
|
||
for Auto Backup. The Auto Backup feature does have some limitations in terms of
|
||
what data it can backup and it's availability on Android 6.0 and higher devices.
|
||
Consider using the Key/Value Backup feature if you have more specific needs for
|
||
backing up your app data. For more information, see <a href="{@docRoot}guide/topics/data/keyvaluebackup.html#Comparison">Comparison of Key/Value and Auto Backup</a></p>
|
||
|
||
<p class="note"><strong>Note:</strong> These data backup features are not designed for synchronizing app data with other clients or
|
||
saving data that you'd like to access during the normal application lifecycle.
|
||
You cannot read or write backup data on demand. For synchronizing app data, see
|
||
<a href="{@docRoot}training/sync-adapters/index.html">Transferring
|
||
Data Using Sync Adapters</a> or <a href="https://developers.google.com/drive/android/">Google Drive Android
|
||
API</a>. |