-
Notifications
You must be signed in to change notification settings - Fork 16
Backup rules
From SDK version 12.0.0 onwards, to comply with security recommendations the following changes have been made to the backup policy:
Only shared preferences related to the SDK are being backed up to the cloud, along with the database. Device to device transfer is disabled to avoid registration's data processing issues. These rules can be overridden at the application level.
At the application
level of your AndroidManifest.xml
file add:
<application ...
android:fullBackupContent="@xml/your_backup_rules">
</application>
Then create your_backup_rules
resource file in the /res/xml
folder as following:
<full-backup-content>
<include domain=["file" | "database" | "sharedpref" | "external" |
"root" | "device_file" | "device_database" |
"device_sharedpref" | "device_root" ] path="string"
requireFlags=["clientSideEncryption" | "deviceToDeviceTransfer"] />
<exclude domain=["file" | "database" | "sharedpref" | "external" |
"root" | "device_file" | "device_database" |
"device_sharedpref" | "device_root" ] path="string" />
</full-backup-content>
At the application
level of your AndroidManifest.xml
file add:
<application ...
android:dataExtractionRules="@xml/data_backup_rules"
</application>
In the res/xml
folder, create the resource file data_backup_rules.xml
as following:
<data-extraction-rules>
<cloud-backup [disableIfNoEncryptionCapabilities="true|false"]>
...
<include domain=["file" | "database" | "sharedpref" | "external" |
"root" | "device_file" | "device_database" |
"device_sharedpref" | "device_root" ] path="string"/>
...
<exclude domain=["file" | "database" | "sharedpref" | "external" |
"root" | "device_file" | "device_database" |
"device_sharedpref" | "device_root" ] path="string"/>
...
</cloud-backup>
<device-transfer>
...
<include domain=["file" | "database" | "sharedpref" | "external" |
"root" | "device_file" | "device_database" |
"device_sharedpref" | "device_root" ] path="string"/>
...
<exclude domain=["file" | "database" | "sharedpref" | "external" |
"root" | "device_file" | "device_database" |
"device_sharedpref" | "device_root" ] path="string"/>
...
</device-transfer>
</data-extraction-rules>
If there are no rules for a particular backup mode, such as if the <device-transfer>
section is missing, that mode is fully enabled for all content except for no-backup
and cache
directories, as described in the documentation.
For additional information on backup and restore, please follow official documentation, along with testing guidelines.
If you have any questions or suggestions, feel free to send an email to [email protected] or create an issue.
- Library events
- Server errors
- Users and installations
- Messages and notifications management
- Inbox
Geofencing API- DEPRECATED- Android Manifest components
- Privacy settings
- In-app chat
- Infobip RTC calls and UI
- Backup rules