Initialize the Android SDK
If you used the sdk-configurator to generate your configuration model, as described in Configuring the client, you can use the OneginiClientBuilder#build()
method to initialize the Android SDK. If you created your own implementation of the OneginiClientConfigModel
, you can provide it explicitly using the OneginiClientBuilder#setConfigModel()
method.
The OneginiClientBuilder
constructor has three mandatory parameters:
applicationContext
OneginiCreatePinRequestHandler
OneginiPinAuthenticationRequestHandler
For more information about these parameters see authenticators.
Starting the Android SDK
When the user starts the application, the first method that should be called on the Android SDK is the OneGiniClient#start
method. The method is responsible for asynchronous initialization of the Android SDK. The method requires a OneginiInitializationHandler
in order to return initialization results and errors.
Note
The OneginiClient#start
method must complete before calling subsequent Android SDK methods. Calling additional methods before OneginiClient#start
completes may cause operation errors.
If an error occurs during start, the Android SDK returns onError
with an OneginiInitializationError
object containing the error details.