inappmessaging / com.rakuten.tech.mobile.inappmessaging.runtime / InAppMessaging / init

init

fun init(context: Context, errorCallback: ((Exception) -> Unit)? = null): Boolean

Initializes the In-App Messaging SDK. [errorCallback](/android-inappmessaging/docs/4.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.

Return true if initialization is successful, and false otherwise.