Stay organized with collections
Save and categorize content based on your preferences.
AuthenticationResult
open class AuthenticationResult
Container for callback data from authenticate(android.os.CancellationSignal,java.util.concurrent.Executor,android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)
and authenticate(android.hardware.biometrics.BiometricPrompt.CryptoObject,android.os.CancellationSignal,java.util.concurrent.Executor,android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)
.
Summary
Public methods |
open Int |
Provides the type of authentication (e.g. device credential or biometric) that was requested from and successfully provided by the user.
|
open BiometricPrompt.CryptoObject! |
Provides the crypto object associated with this transaction.
|
Public methods
getAuthenticationType
open fun getAuthenticationType(): Int
Provides the type of authentication (e.g. device credential or biometric) that was requested from and successfully provided by the user.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# BiometricPrompt.AuthenticationResult\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAuthenticationResult\n====================\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/hardware/biometrics/BiometricPrompt.AuthenticationResult \"View this page in Java\") \n\n```\nopen class AuthenticationResult\n```\n\n|---|-----------------------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.hardware.biometrics.BiometricPrompt.AuthenticationResult](#) |\n\nContainer for callback data from [authenticate(android.os.CancellationSignal,java.util.concurrent.Executor,android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)](/reference/kotlin/android/hardware/biometrics/BiometricPrompt#authenticate(android.os.CancellationSignal,%20java.util.concurrent.Executor,%20android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)) and [authenticate(android.hardware.biometrics.BiometricPrompt.CryptoObject,android.os.CancellationSignal,java.util.concurrent.Executor,android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)](/reference/kotlin/android/hardware/biometrics/BiometricPrompt#authenticate(android.hardware.biometrics.BiometricPrompt.CryptoObject,%20android.os.CancellationSignal,%20java.util.concurrent.Executor,%20android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)).\n\nSummary\n-------\n\n| Public methods ||\n|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| open [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getAuthenticationType](#getAuthenticationType())`()` Provides the type of authentication (e.g. device credential or biometric) that was requested from and successfully provided by the user. |\n| open [BiometricPrompt.CryptoObject](/reference/kotlin/android/hardware/biometrics/BiometricPrompt.CryptoObject)! | [getCryptoObject](#getCryptoObject())`()` Provides the crypto object associated with this transaction. |\n\nPublic methods\n--------------\n\n### getAuthenticationType\n\nAdded in [API level 30](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getAuthenticationType(): Int\n```\n\nProvides the type of authentication (e.g. device credential or biometric) that was requested from and successfully provided by the user.\n\n| Return ||\n|----------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | An integer value representing the authentication method used. Value is [android.hardware.biometrics.BiometricPrompt#AUTHENTICATION_RESULT_TYPE_DEVICE_CREDENTIAL](/reference/kotlin/android/hardware/biometrics/BiometricPrompt#AUTHENTICATION_RESULT_TYPE_DEVICE_CREDENTIAL:kotlin.Int), or [android.hardware.biometrics.BiometricPrompt#AUTHENTICATION_RESULT_TYPE_BIOMETRIC](/reference/kotlin/android/hardware/biometrics/BiometricPrompt#AUTHENTICATION_RESULT_TYPE_BIOMETRIC:kotlin.Int) |\n\n### getCryptoObject\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getCryptoObject(): BiometricPrompt.CryptoObject!\n```\n\nProvides the crypto object associated with this transaction.\n\n| Return ||\n|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [BiometricPrompt.CryptoObject](/reference/kotlin/android/hardware/biometrics/BiometricPrompt.CryptoObject)! | The crypto object provided to [authenticate(android.hardware.biometrics.BiometricPrompt.CryptoObject,android.os.CancellationSignal,java.util.concurrent.Executor,android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)](/reference/kotlin/android/hardware/biometrics/BiometricPrompt#authenticate(android.hardware.biometrics.BiometricPrompt.CryptoObject,%20android.os.CancellationSignal,%20java.util.concurrent.Executor,%20android.hardware.biometrics.BiometricPrompt.AuthenticationCallback)) |"]]