Android Authentication
Android Mobile framework provides class CrypteriumLite which is used for injecting authorize tokens inside the framework. Use method “SignIn”
CrypteriumLite.getInstance(<AppContext>).signIn(token: String, refreshToken: String, tokenTTL: Int,successCallback: () -> Unit,errorCallback: (ApiError) -> Unit)
The framework provides app callbacks for observing authentication states.
CrypteriumLite.appCallback = object : CrypteriumInterface {
// when token is expired
override fun onTokenExpired() {
//your flow
}
// when sdk is finish its work
override fun onFinish() {
//your flow
}
// when sdk request chat
override fun openChat() {
//your flow
}
}
Updated about 3 years ago