fun initialize(sdkKey: String, sdkSecret: String, context: Context, jwtToken: String? = null): Deferred<Int>
Initializes the VenueNext SDK
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
We do not recommend use of this function because no error handling is possible in case of a failure.
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
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
configFile
- File object initialized to path of the JSON config file sent by VN