Skip to content

Most visited

Recently visited


Backing up App Data to the Cloud

Dependencies and prerequisites

  • Android 2.2 (API level 8) and higher

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 class covers techniques for backing up data to the cloud so that users can restore their data when recovering from a data loss (such as a factory reset) or installing your application on a new device.

It is important to note that the API for cloud backup changed with the release of Android 6.0 (API level 23). For your app to support backup both on devices running Android 6.0, and those running Android 5.1 (API level 22) and lower, you must implement both techniques that this class explains.


Configuring Auto Backup for Apps
This lesson applies to Android 6.0 (API level 23) and higher. Learn how to accomplish seamless app data backup and restore with zero additional lines of application code.
Using the Backup API
This lesson applies to Android 5.1 (API level 22) and lower. Learn how to integrate the Backup API into your Android app, so all of that app's user data, such as preferences, notes, and high scores, updates seamlessly across all devices linked to that Google account.
This site uses cookies to store your preferences for site-specific language and display options.


This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.