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-backup service periodically backs up Shared Preference file, Database files, etc, more details here.
This backup results in MoEngage SDK's identifiers being backed up and restored after re-install.
This restoration of the identifier results in your data being corrupted and the 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 backup descriptor in the application tag of the Manifest file.

The backup descriptor should be assigned to fullBackupContent attribute of the application tag.


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"?>
  <exclude domain="database" path="MOEInteractions"/>

  <exclude domain="sharedpref" path="pref_moe.xml"/>