Exclude MoEngage Storage File from Auto-Backup
This is a mandatory integration step and is very essential to prevent your data from getting corrupted.
Android's auto back-up service periodically backs up Shared Preference file, Database files etc, more details here.
This back-up results in MoEngage SDK's identifiers to be backed up and restored after re-install.
This restoration of the identifier results in your data being corrupted and user not being reachable via push notifications.
To ensure data is not corrupted after a backup is restored, opt-out of MoEngage SDK's storage files.
- Add a back-up descriptor in the
application
tag of the Manifest file.
The back-up descriptor should be assigned to fullBackupContent
attribute of the application
tag.
<application
...
android:fullBackupContent="@xml/backup_descriptor">
</application>
- Exclude MoEngage Files in the descriptor file.
Exclude the below mentioned database file and shared preference file in the descriptor to ensure these files aren't backed up.
<?xml version="1.0" encoding="utf-8"?>
<full-backup-content>
<exclude domain="database" path="MOEInteractions"/>
<exclude domain="sharedpref" path="pref_moe.xml"/>
</full-backup-content>
Updated over 5 years ago