What does this Lint warning mean:
Should explicitly set 'android:fullBackupContent' to avoid backing up the GCM device specific regId?
I've googled but haven't found anything yet.
For this we have android:fullBackupContent in the application tag, which points to a XML file that contains full backup rules for Auto Backup. These rules determine what files get backed up.
Backup data is stored in a private folder in the user's Google Drive account, limited to 25MB per app. The saved data does not count towards the user's personal Google Drive quota. Only the most recent backup is stored. When a backup is made, the previous backup (if one exists) is deleted.
Backup options. Android provides two ways for apps to back up their data to the cloud: Auto backup for apps and Key/Value Backup. Auto Backup, which is available on Android version 6.0 and higher, preserves data by uploading it to the user's Google Drive account.
Part of the disturbing "auto backup for apps" is the ability to control what files get backed up, via android:fullBackupContent
. That attribute points to an XML resource (e.g., @xml/backup_rulez
), that describes either a whitelist or a blacklist controlling what gets backed up.
What the Lint warning is warning you about is not backing up the GCM registration ID, as that is per-device, and so it would need to be re-generated if your app's data is restored from the backup onto a new device. Personally, off the top of my head, I don't know where GCM is storing that registration ID.
CommonsWare is correct. However, GCM does not store that regid for you - The GCM quickstarter used to suggest (it has since been updated) that you store it yourself in a shared prefs file. The lint rule is detecting that you have declared a receiver for GCM and therefore assumes that you are stashing the regid somewhere. Because you haven't declared a fullBackupContent flag in your manifest it is warning you that your app will likely break across restore. You use the fullBackupContent to exclude or include whatever data you would like to not leave the device and be restored on another device (gcm instance id token is one example)
more details here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With