//inappmessaging/com.rakuten.tech.mobile.inappmessaging.runtime/InAppMessaging
InAppMessaging
[androidJvm]
abstract class InAppMessaging
Main entry point for the IAM SDK. Should be accessed via InAppMessaging.instance.
Types
Name | Summary |
---|---|
Companion | [androidJvm] object Companion |
Functions
Name | Summary |
---|---|
closeMessage | [androidJvm] abstract fun closeMessage(clearQueuedCampaigns: Boolean = false) Close the currently displayed message. This should be called when app needs to force-close the displayed message without user action. Calling this method will not increment the campaign impression. |
logEvent | [androidJvm] abstract fun logEvent(@NonNullevent: Event) This methods logs the event which the InAppMessaging SDK checks to know the messages’ triggers are satisfied, then display that message if all trigger conditions are satisfied. |
registerMessageDisplayActivity | [androidJvm] abstract fun registerMessageDisplayActivity(@NonNullactivity: Activity) This method registers activity where message can be displayed This method should be called in onResume() of the activity to register. In order for InAppMessaging SDK to display messages, host app must pass an Activity which the host app allows the SDK to display any Messages. |
registerPreference | [androidJvm] abstract fun registerPreference(@NonNulluserInfoProvider: UserInfoProvider) This method registers provider containing user information userInfoProvider, like Access Token and User ID. |
unregisterMessageDisplayActivity | [androidJvm] abstract fun unregisterMessageDisplayActivity() This method unregisters the activity from InAppMessaging This method should be called in onPause() of the registered activity in order to avoid memory leaks. If there is message being displayed, it will be closed automatically. |
Properties
Name | Summary |
---|---|
onPushPrimer | [androidJvm] abstract var onPushPrimer: () -> Unit? This callback is called if a push primer button is tapped. If not set, SDK will request push permission. |
onVerifyContext | [androidJvm] abstract var onVerifyContext: (contexts: List<String>, campaignTitle: String) -> Boolean This callback is called just before showing a message of campaign that has registered contexts. Return false to prevent the message from displaying. |