Starting Android SDK
Once the SDK has been initialized, it can then be started with SensibillSDK.start()
.
Note: the userIdentifier
you provide to .start()
will be the one passed to your TokenProvider
when the SDK requests new tokens.
val userIdentifier = "currentUser"
SensibillSDK.start(userIdentifier, object : SDKStartup {
override fun onSDKStarted() {
// The SDK has successfully started. All functionality can now be safely used.
}
override fun onSDKFailed(loginError: LoginError?, errorMessage: String?) {
// The SDK failed to start. This may be because it has not been initialized yet, or the `TokenProvider`
// was not able to provide a token. See `loginError` for details
}
})
final String userIdentifier = "currentUser";
SensibillSDK.getInstance().start(userIdentifier, new SDKStartup() {
@Override
public void onSDKStarted() {
// The SDK has successfully started. All functionality can now be safely used.
}
@Override
public void onSDKFailed(LoginError loginError, String errorMessage) {
// The SDK failed to start. This may be because it has not been initialized yet, or the `TokenProvider`
// was not able to provide a token. See `loginError` for details
}
});