vncore / com.venuenext.vncore / VenueNext / initialize

initialize

fun initialize(sdkKey: String, sdkSecret: String, context: Context, jwtToken: String? = null): Deferred<Int>

Initializes the VenueNext SDK

Parameters

sdkKey -

sdkSecret -

context -

jwtToken - A JSON Web Token used for managing a user. See https://venuenext.github.io/android/sdk-setup/#step-2a-initialization-with-a-jwt-token for more info.

fun initialize(sdkKey: String, sdkSecret: String, context: Context, jwt: String? = null, completion: () -> Unit): Unit
Deprecated: Deprecated

We do not recommend use of this function because no error handling is possible in case of a failure.

Parameters

sdkKey -

sdkSecret -

context -

completion - Callback ONLY when the SDK initialization has completed successfully

fun initialize(sdkKey: String, sdkSecret: String, context: Context, jwtToken: String? = null, onSuccess: () -> Unit, onError: (Throwable) -> Unit): Unit
Deprecated: Deprecated - Will be removed in a future release in favor of config file initialization. See https://venuenext.github.io/android/sdk-setup/#step-2b-initialize-with-a-config-file for more info.

Parameters

sdkKey -

sdkSecret -

context -

onSuccess - Callback when the SDK initialization has completed successfully

onError - Error callback that accepts a Throwable. Instances of CancellationException, this should not be treated as an error.

fun initialize(sdkKey: String, sdkSecret: String, context: Context, jwt: String? = null, configJsonString: String, onSuccess: () -> Unit, onError: (Throwable) -> Unit): Unit

Parameters

sdkKey -

sdkSecret -

context -

configFile - File object initialized to path of the JSON config file sent by VN

jwt - JWT string representing user