Skip to content

SdkReference

Xavier F. Gouchet edited this page Sep 4, 2024 · 1 revision

class SdkReference@JvmOverloadsconstructor(sdkInstanceName: String? = null, onSdkInstanceCaptured: (SdkCore) -> Unit = {})

Class establishing the reference to the particular SDK instance by using its name.

Once SDK instance with given name is available (during the SdkReference.get call), it will be kept in this class and callback onSdkInstanceCaptured will be fired.

Once SDK instance with given name becomes inactive (it is stopped), reference will be automatically cleaned up.

Parameters

sdkInstanceName Name of the SDK instance to capture. If no name is provided, default SDK instance will be checked.
onSdkInstanceCaptured Callback which will be fired once SDK instance is acquired.

Constructors

SdkReference

@JvmOverloads

constructor(sdkInstanceName: String? = null, onSdkInstanceCaptured: (SdkCore) -> Unit = {})

Parameters
sdkInstanceName Name of the SDK instance to capture. If no name is provided, default SDK instance will be checked.
onSdkInstanceCaptured Callback which will be fired once SDK instance is acquired.

Functions

get

fun get(): SdkCore?

Returns SDK instance if it is acquired, null otherwise.

Clone this wiki locally