Standard
In-app messaging allows you to communicate with users directly within your application, delivering contextual and timely messages that enhance engagement. This feature enables a new level of personalization by allowing you to display messages, promotions, or tips based on user behavior or interaction patterns.
Integrating in-app messages helps create a continuous communication channel with your users — ensuring that relevant content is displayed exactly when it matters most.
To enable this functionality, include the actito-in-app-messaging module in your project.
dependencies {
def actito_version = 'REPLACE_WITH_LATEST_VERSION'
implementation "com.actito:actito-in-app-messaging:$actito_version"
}
The in-app messaging module is a zero-configuration library, meaning no additional setup or initialization code is required. Simply including the dependency automatically enables the feature within your project.
Suppressing messages
In certain scenarios — such as during a checkout or onboarding flow — you may want to temporarily prevent in-app messages from appearing to avoid disrupting the user experience.
You can suppress in-app messages by setting the hasMessagesSuppressed flag:
Actito.inAppMessaging().hasMessagesSuppressed = true
It is important to reset the flag once the high-priority flow is complete. If not reset, messages will remain suppressed until the application is restarted.
Excluding specific activities
You can also exclude particular activities from being evaluated for in-app messages when they come to the foreground. To do so, add the following metadata to the activity declaration in your AndroidManifest.xml:
<activity android:name=".CustomActivity">
<!-- Prevents this activity from showing in-app messages -->
<meta-data
android:name="com.actito.iam.ui.suppress_messages"
android:value="true" />
</activity>
This configuration is useful for screens where displaying an in-app message would be disruptive, such as secure payment or authentication flows.
Re-evaluating message context
By default, the SDK does not automatically re-evaluate the app’s foreground context when you stop suppressing messages. If you want the SDK to immediately re-evaluate and display any in-app messages after suppression ends, call the following method instead:
Actito.inAppMessaging().setMessagesSuppressed(false, evaluateContext = true)
This ensures that relevant messages are displayed promptly once the user exits the restricted flow.