Should full backup content xml file be empty or not added at all to include all?
Fast Solution:
AndroidManifest.xml
<application android:allowBackup="true" android:fullBackupContent="true" ... ... ...</application>
For more details see: https://developer.android.com/guide/topics/data/autobackup
If you want to silence the warnings, but don't need to exclude any files from the backup, you could also just add tools:ignore="AllowBackup"
to the application
tag in your AndroidManifest.xml
to suppress the warning (or use the Suppress
button that you get when viewing the warning details).
I also struggled the same question and couldn't find an answer. So for backup all, I tried making a backup.xml
file like that:
<?xml version="1.0" encoding="utf-8"?> <full-backup-content> </full-backup-content>
and it works fine.
EDIT 06/04/21
Just got an official answer from Google IssueTracker
:
The answer to your question appears at the beginning of the section titled Include and exclude files: "By default, the system backs up almost all app data".In order to back up all supported data, don't include android:fullBackupContent in your manifest file.