KwikBiometricsAuthenticationContract

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"
)
)

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun createIntent(context: Context, input: KwikBiometricPromptParams): Intent
Link copied to clipboard
open override fun parseResult(resultCode: Int, intent: Intent?): Int