init

fun init(context: Context, sdkHash: String)

Initializes the Playtime SDK.

You must initialize the Playtime SDK before you can use any of its features. The initialization will run asynchronously in the background

Parameters

context

A context.

sdkHash

Your Playtime SDK hash.


fun init(context: Context, sdkHash: String, listener: PlaytimeInitialisationListener)

Initializes the Playtime SDK.

You must initialize the Playtime SDK before you can use any of its features. The initialization will run asynchronously in the background and notify you when it is finished by invoking the PlaytimeInitialisationListener's onInitialisationFinished or onInitialisationError method.

Parameters

context

A context.

sdkHash

Your Playtime SDK hash.

listener

A listener which informs you about whether the Playtime SDK was initialized successfully or not.


fun init(context: Context, sdkHash: String, options: PlaytimeOptions)

Initializes the Playtime SDK.

You must initialize the Playtime SDK before you can use any of its features. The initialization will run asynchronously in the background

Parameters

context

A context.

sdkHash

Your Playtime SDK hash.

options

An object to pass additional options to the Playtime SDK when initializing.


fun init(context: Context, sdkHash: String, options: PlaytimeOptions, listener: PlaytimeInitialisationListener)

Initializes the Playtime SDK.

You must initialize the Playtime SDK before you can use any of its features. The initialization will run asynchronously in the background and notify you when it is finished by invoking the PlaytimeInitialisationListener's onInitialisationFinished or onInitialisationError method.

Parameters

context

A context.

sdkHash

Your Playtime SDK hash.

options

An object to pass additional options to the Playtime SDK when initializing.

listener

A listener which informs you about whether the Playtime SDK was initialized successfully or not.