requestSdk

An asynchronous request for an instance of MobileAppMessaging.

This method provides an asynchronous way to get a MobileAppMessaging instance. If initialization has already completed successfully, the listener will be called immediately. If initialization is still in progress, the listener will be called when initialization completes.

Note: If initialization completes with a failed status, the listener will not be called, and the current list of WhenReadyListener listeners will be cleared.

Parameters

listener

Callback to be called after initialization has completed successfully. Must not be null.

See also

#unregisterWhenReadyListener(WhenReadyListener)

Throws

IllegalArgumentException

if listener is null


@JvmStatic
fun requestSdk(looper: Looper?, listener: MobileAppMessaging.WhenReadyListener)

An asynchronous request for an instance of MobileAppMessaging.

This method provides an asynchronous way to get a MobileAppMessaging instance with a specific Looper for the callback. If initialization has already completed successfully, the listener will be called immediately. If initialization is still in progress, the listener will be called when initialization completes.

Note: If initialization completes with a failed status, the listener will not be called, and the current list of WhenReadyListener listeners will be cleared.

Parameters

looper

Used for the callback. If null, the current thread's Looper or main Looper will be used

listener

Callback to be called after initialization has completed successfully. Must not be null.

See also

#unregisterWhenReadyListener(WhenReadyListener)

Throws

IllegalArgumentException

if listener is null