Are there additional methods?
UserExist
This is a method to see if there is a registered user on the device from the bioapp stored in sharedPreferences:
publicDataSource.userExist {
it.fold({ bioException ->
Toast.makeText(this, bioException.message, Toast.LENGTH_LONG).show()
}) { userExist ->
if (userExist) {
Toast.makeText(this,"Error usuario existe",Toast.LENGTH_SHORT).show()
}
else {
Toast.makeText(this,"Error usuario no existe",Toast.LENGTH_SHORT).show()
}
}
}
UserExistEmailPhone
Search for a user in our Biocryptology database using an email address and telephone number.
userExistEmailPhone(email, phone) { userExist ->
userExist.fold({ exception ->
// Error: exception.messange && exception.code && exception.error
},{ active ->
if (!active) {
// User not active
} else {
// User active
}
})
}
UserInfo
Extract user information from our Biocryptology database.
publicDataSource.userInfo(tokenResponse) { result ->
result.fold( { exception ->
// exception.message && exception.code && exeption.error
}, { userInfo ->
// username = userInfo.name
})
}
* When the token has expired (after 5 minutes without activity) this call returns a new valid token.
val isDataSource = ISDataSource(BiocryptologyRemoteDB())
val refreshTokenResponse = isDataSource.refreshToken(tokenResponse.refresh_token!!, BioApplication.isClientLib!!.clientId,BioApplication.isClientLib!!.clientSecret)
refreshTokenResponse.foldT({
// No token: startLogin
}){
// tokenResponse
}
RegisterDevice
Register a pnsToken
val terminalToken = TerminalToken().apply { |
|
val registerDevice = appManagerDataSource.registerDevice(terminalToken) |
|
CancelTemporalUser
In case the enrollment failed, this method is called before starting a new user registration process.
publicDataSource.cancelTemporalUser {
it.fold({
Toast.makeText(this,"No se ha podido cancelar el usuario",Toast.LENGTH_SHORT).show()
},{
// Sucess
})
}
RetryPin
Used to retry sending an email/sms, if the user has not received it correctly, he/she can request a retry.
publicDataSource.retryPin(PublicDataSource.PinField.Phone){ retryPinResponse ->
retryPinResponse.fold({
// Error
},{
if (it) {
// Email/SMS sent
} else {
// Email/SMS not sent
}
})
Can I add languages on screens in the library?
There are windows in the library where you can manage texts and overwrite/add new languages:
|
|
<string name="bfy_lib_title_fingerprint">Identifícate</string> |
<string name="bfy_lib_domain_verified">Sitio seguro</string> |
|