Overview

Skill Level: Any

Prerequisites

To limit unexpected behavior from your application when invalidateExistingUser: true, if the backup is outdated, or if you are testing, you should either disable automated backups or exclude the appropriate SDK files from full backup.

Not what you’re looking for? Check out all our available tutorials for mobile app messaging here.

Step-by-step

  1. To disable automated backups for your application (recommended)

    Use 

    <application android:allowBackup="false" ...
    

    in your AndroidManifest.xml file.

  2. If your application must allow backups for other purposes, be sure to exclude the appropriate SDK files from full backup.

    You do this by adding an .xml file with backup rules to your app, and then specifying that .xml file in the AndroidManifest.xml file:

    <application android:fullBackupContent="@xml/my_backup_rules"...
    

    The following files must be excluded by adding backup rules for them:

    <exclude domain="sharedpref" path="IBM_MCE_SDK_DATA.xml"/>
    <exclude domain="database" path="mce3x.sqlite"/>
    <exclude domain="database" path="mce.attributes"/>
    
  3. If you use locations, you must ALSO exclude:

    Be sure to include step 2 with these rules as well.

    <exclude domain="database" path="locations.sqlite"/>
    <exclude domain="database" path="cognitive_location.sqlite"/>
    
  4. If you use inbox messages, you must ALSO exclude:

    Be sure to include step 2 with this rule as well.

    <exclude domain="database" path="messages.sqlite"/>
    
  5. If you use in-app messages, you must ALSO exclude:

    Be sure to include step 2 with this rule as well.

    <exclude domain="database" path="mceInappMessages.sqlite"/>
    

Expected outcome

For more information about including and excluding files from backup, see Android’s information regarding files that are backed up.

Need more help? Check out all of our available tutorials for mobile app messaging here.

Join The Discussion

Your email address will not be published. Required fields are marked *