Skip to content

ws1-framework/com.airwatch.sdk.context/SDKContext/init

init

abstract fun init(context: Context)

Initialize an instance of SDKContextManager. Key manager required for cipher operation is loaded. A random pass code is used to initialize the key manager.

Parameters

Name Description
context - SDKContext.

Parameters

Name Description
context - Context.
passcode Initialize key man ager with the given pass code.

Parameters

Name Description
context - Context.
keyManager - MasterKeyManager instance to initialize the SDKContextManager with.

Throws

Exception Condition
java.lang.IllegalArgumentException throw this exception if context is null.

abstract fun init(context: Context, passcode: Array<Byte>)

Initialize an instance of SDKContextManager. Key manager. required for cipher operation is loaded.

Throws

Exception Condition
com.airwatch.sdk.context.SDKContextException - If unable to initiate SDKKeyManager.
java.lang.IllegalArgumentException throw this exception if context is null.

abstract fun init(context: Context, keyManager: MasterKeyManager)

Initialize an instance of SDKContextManager. Key manager required for cipher operation is loaded. This method is used when the app wants to have more control over the key manager initialization by providing an instance of MasterKeyManager. This is useful in scenarios where the app wants to use a custom implementation of the key manager or wants to use a specific configuration for the key manager.

Throws

Exception Condition
java.lang.IllegalArgumentException throw this exception if context or keyManager is null.