Package-level declarations
Types
Link copied to clipboard
class FingerPrintController(fingerprintManagerCompat: FingerprintManagerCompat, callback: FingerPrintController.FingerprintCallback, context: Context, DEFAULT_KEY_NAME: String = "crypto-default_key") : FingerprintManagerCompat.AuthenticationCallback
Functions
Link copied to clipboard
inline fun Fragment.biometricAuth(promptInfo: BiometricPrompt.PromptInfo, crossinline onAuthFailed: () -> Unit, crossinline onAuthError: (errorCode: Int, errorMessage: String) -> Unit = { _, _ -> }, crossinline onAuthSuccess: (result: BiometricPrompt.AuthenticationResult) -> Unit = { _ -> }): BiometricPrompt
inline fun Fragment.biometricAuth(promptInfoAction: BiometricPrompt.PromptInfo.Builder.() -> BiometricPrompt.PromptInfo.Builder, crossinline onAuthFailed: () -> Unit, crossinline onAuthError: (errorCode: Int, errorMessage: String) -> Unit = { _, _ -> }, crossinline onAuthSuccess: (result: BiometricPrompt.AuthenticationResult) -> Unit = { _ -> }): BiometricPrompt
inline fun FragmentActivity.biometricAuth(promptInfo: BiometricPrompt.PromptInfo, crossinline onAuthFailed: () -> Unit, crossinline onAuthError: (errorCode: Int, errorMessage: String) -> Unit = { _, _ -> }, crossinline onAuthSuccess: (result: BiometricPrompt.AuthenticationResult) -> Unit = { _ -> }): BiometricPrompt
inline fun FragmentActivity.biometricAuth(promptInfoAction: BiometricPrompt.PromptInfo.Builder.() -> BiometricPrompt.PromptInfo.Builder, crossinline onAuthFailed: () -> Unit, crossinline onAuthError: (errorCode: Int, errorMessage: String) -> Unit = { _, _ -> }, crossinline onAuthSuccess: (result: BiometricPrompt.AuthenticationResult) -> Unit = { _ -> }): BiometricPrompt
Use canAuthenticate before calling this function, just to see if the user can be authenticated, don't blame the API or the function if you get a weird result code that you forgot to handle, peace.
Link copied to clipboard
inline fun Fragment.canAuthenticate(type: Int = DEVICE_CREDENTIAL or BIOMETRIC_STRONG, hardwareUnavailable: () -> Unit = {}, securityUpdateNeeded: () -> Unit = {}, noFingerprintsEnrolled: () -> Unit = {}, canAuthenticateAction: () -> Unit = {})
inline fun FragmentActivity.canAuthenticate(type: Int = DEVICE_CREDENTIAL or BIOMETRIC_STRONG, hardwareUnavailable: () -> Unit = {}, securityUpdateNeeded: () -> Unit = {}, noFingerprintsEnrolled: () -> Unit = {}, canAuthenticateAction: () -> Unit = {})