SdkReference - DataDog/dd-sdk-android GitHub Wiki
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
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
Returns SDK instance if it is acquired, null otherwise.