What is “android:allowBackup”?

前端 未结 4 1743
庸人自扰
庸人自扰 2020-11-29 15:24

Since the new ADT preview version (version 21), they have a new lint warning that tells me the next thing on the manifest file (in the application tag):

4条回答
  •  情书的邮戳
    2020-11-29 15:54

    Here is what backup in this sense really means:

    Android's backup service allows you to copy your persistent application data to remote "cloud" storage, in order to provide a restore point for the application data and settings. If a user performs a factory reset or converts to a new Android-powered device, the system automatically restores your backup data when the application is re-installed. This way, your users don't need to reproduce their previous data or application settings.

    ~Taken from http://developer.android.com/guide/topics/data/backup.html

    You can register for this backup service as a developer here: https://developer.android.com/google/backup/signup.html

    The type of data that can be backed up are files, databases, sharedPreferences, cache, and lib. These are generally stored in your device's /data/data/[com.myapp] directory, which is read-protected and cannot be accessed unless you have root privileges.

    UPDATE: You can see this flag listed on BackupManager's api doc: BackupManager

提交回复
热议问题