In 184.108.40.206, the Mobile app messaging SDK uses the SQLite database implementation for in-app messages. Earlier releases used the Realm database.
By using the SQLite database implementation, IBM Mobile App Messaging reduces the apparent size of the app in the Google Play store by up to 3 MB.
How it affects you
Based on how you are currently using in-app messaging, you must decide what to do with messages in the Realm database. Consider the following cases.
Case 1 – You are not using in-app messages.
You are not affected by the move the to the SQLite implementation. If you choose to integrate in-app messages in the future, the messages use the SQLite database and benefit from the smaller app size.
Case 2 – You don’t want to reuse in-app messages that were sent in an earlier release (or messages that expired).
In this case, delete the Realm database but do not migrate existing messages. When you integrate the new in-app plug-in, remove the Realm dependencies in your moduleâ€™s build.gradle:
Next, delete the Realm database, if it exists, in your startup code. Use the application class’s onCreate method:
File realmFile = new File(getApplicationContext().getFilesDir(),"mce-inapp.realm");
Case 3 – You want to reuse in-app messages that were sent in an earlier release.
Migrate the Realm messages to the SQLite database by integrating the Realm migration code for at least one app release. To complete the move to SQLite and take advantage of the reduced size of the SQLite database, wait to a later release to remove the Realm migration code.
To integrate the Realm migration code, ensure that you include the Realm dependencies in your module’s build.gradle. The Realm dependencies should already be present from a previous release of the SDK:
The migration from Realm happens automatically when the app receives or displays an in-app message.
To force the migration, call:
InAppManager.checkMigration(getContext());To start the migration
Subsequent calls to checkMigration do nothing.
After most of your users migrate their messages, you can release a second version of the app without the Realm dependencies. For instructions, see Case 2.
For more information about in-app messages, see Implementing in-app messages in your mobile app.
Go Back to the Mobile App Messaging home page.