inappmessaging / com.rakuten.tech.mobile.inappmessaging.runtime / InAppMessaging
InAppMessaging
abstract class InAppMessaging
Main entry point for the IAM SDK. Should be accessed via InAppMessaging.instance.
Properties
| onVerifyContext | This callback is called just before showing a message of campaign that has registered contexts. Return false
to prevent the message from displaying.abstract var onVerifyContext: (contexts:
List
<
String
>, campaignTitle:
String
) ->
Boolean
|
Functions
| closeMessage | 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.abstract fun closeMessage(clearQueuedCampaigns:
Boolean
= false):
Unit
|
| logEvent | 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.abstract fun logEvent(event:
Event
):
Unit
|
| registerMessageDisplayActivity | 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.abstract fun registerMessageDisplayActivity(activity:
Activity
):
Unit
|
| registerPreference | This method registers provider containing user information userInfoProvider, like Access Token and User ID.abstract fun registerPreference(userInfoProvider:
UserInfoProvider
):
Unit
|
| 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.abstract fun unregisterMessageDisplayActivity():
Unit
|
Companion Object Functions
| init | Initializes the In-App Messaging SDK. [errorCallback](/android-inappmessaging/docs/6.0/api/com.rakuten.tech.mobile.inappmessaging.runtime/-in-app-messaging/init.html#com.rakuten.tech.mobile.inappmessaging.runtime.InAppMessaging.Companion$init(android.content.Context, kotlin.Function1((java.lang.Exception, kotlin.Unit)))/errorCallback) is an optional callback function for app to receive the exception that caused failed init.fun init(context:
Context
, errorCallback: ((
Exception
) ->
Unit
)? = null):
Boolean
|
| instance | Instance of InAppMessaging.fun instance():
InAppMessaging
|