Android In-App Messages

In App Messages are triggered based on realtime In-App events. You have to tag these events in your App. To read about how In App Message campaigns are created on the platform checkout the In App Messaging docs. Real-time events can also be used for triggering other comms like push notifications, email and SMS. 

Session Start

There is a default event for tracking Session Starts or App open events. This is the most basic type of In App Messaging to enable. To enable In App messaging on app open; call the setEnableStartSession method, before initialising XtremePush in your main activity.

mPushConnector = new PushConnector.Builder("XTREME_PUSH_APP_KEY", "GOOGLE_PROJECT_NUMBER")

You can then select the trigger On Session Start Option when creating an In App Message. 

In App Trigger

Custom Events

If you want your In App messages to appear after custom events occur then you must tag these events with the hitEvent(String title) method. For example if the settings page being opened was an event you want to track for In App messages, you would tag it as follows:


The "opened_settings" event will then be available as a trigger option when creating an In App Message.

In App Trigger

And below you can see an example of a bottom banner In App message that appears after the settings page was opened.

In App Trigger


Event Values

It's possible to pass a value with the event hit. It could be used for additional segmentation and personalization of your messages.

To pass a string value with the event use:

mPushConnector.hitEvent("test", "payload");

To pass key-value pairs with the event use:

HashMap <String, String> hm = new HashMap<>();
hm.put("foo", "bar");
hm.put("lorem", "ipsum");
mPushConnector.hitEvent("test", hm);
Have more questions? Submit a request


Article is closed for comments.