In-App Messaging
In-App Messaging quite different from Cloud Messaging, where it can only display popup when the app is on foreground. But if customizable based on campaign need, so it'll help marketing campaign. Devbase included with inAppMessaging
to handle when the message appear on app, initialize it like this:
val inApp by lazy { MobileService.inApp }
Click Listener¶
Handle when the user click on the message, call this method:
inApp.clickListener {
if (it is InAppMessagingData.FirebaseMessagingData) {
// Action to do based on message and action (Firebase)
} else if (it is InAppMessagingData.AppGalleryConnectMessagingData) {
// Action to do based on message and action (AppGallery Connect)
}
}
Dismiss Listener¶
Handle when the user dismissing the message, call this method:
inApp.dismissListener { message ->
// Action to do when the message dismissed
}