Exclude MoEngage Storage File from Auto-Backup
Exclude MoEngage storage files from Android auto-backup to prevent data corruption after restore.
Auto backup service of Android periodically backs up the Shared Preference file, Database files, and so on.
For more information, refer to Auto Backup.
The backup results in MoEngage SDK identifiers to be backed up and restored after re-install. The restoration of the identifier results in your data being corrupted and the user not being reachable using push notifications.
To ensure data is not corrupted after a backup is restored, opt-out of MoEngage SDK storage files.
If you only want to exclude files only from MoEngage SDK instead of creating a new file you can directly add the backup descriptor file provided by the SDK to the manifest file as shown below.
For applications with targetSdkVersion 31 or above exclusion has to be done in the new format as well.
If you only want to exclude files only from MoEngage SDK, instead of creating a new file, you can directly add the backup descriptor file and data extraction rules file provided by the SDK to the manifest file, as shown below.