Kwik Biometrics Authentication Contract
The contract for biometric authentication.
Usage:
val launcher = rememberLauncherForActivityResult(KwikBiometricsAuthenticationContract()) { result ->
when(result){
KwikBiometricsResult.SUCCESS -> kwikToastState.showToast("Biometric authentication successful", backgroundColor = KwikColorSuccess)
KwikBiometricsResult.FAILED -> kwikToastState.showToast("Biometric authentication failed", backgroundColor = KwikColorError)
KwikBiometricsResult.ERROR -> kwikToastState.showToast("Biometric authentication error", backgroundColor = KwikColorError)
KwikBiometricsResult.CANCELED -> kwikToastState.showToast("Biometric authentication canceled")
KwikBiometricsResult.NOT_SET -> kwikToastState.showToast("No biometrics set", backgroundColor = KwikColorError)
}
}
launcher.launch(
KwikBiometricPromptParams(
title = "Verify Identity",
subtitle = "Authentication required to continue",
cancelText = "Cancel"
)
)
Content copied to clipboard
Functions
Link copied to clipboard
Link copied to clipboard
open fun getSynchronousResult(context: Context, input: KwikBiometricPromptParams): ActivityResultContract.SynchronousResult<Int>?
Link copied to clipboard