Called when a recoverable error has been encountered during authentication. The help
string is provided to give the user guidance for what went wrong, such as
"Sensor dirty, please clean it."
Parameters
helpMsgId
int: An integer identifying the error message
helpString
CharSequence: A human-readable string that can be shown in UI
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# FingerprintManagerCompat.AuthenticationCallback\n\nadded in [version 24.1.0](/topic/libraries/support-library/revisions) \nbelongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1 \nSummary: [Ctors](#pubctors) \\| [Methods](#pubmethods) \\| [Inherited Methods](#inhmethods) \\| [\\[Expand All\\]](#) \n\nFingerprintManagerCompat.AuthenticationCallback\n===============================================\n\n| This package is part of the Android [support library](/topic/libraries/support-library) which is no longer maintained. The support library has been superseded by [AndroidX](/jetpack/androidx) which is part of [Jetpack](/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider [migrating](/jetpack/androidx/migrate) existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library [class\n| mappings](/jetpack/androidx/migrate/class-mappings).\n\n\n`\npublic\nstatic\n\nabstract\nclass\nFingerprintManagerCompat.AuthenticationCallback\n`\n\n\n`\n\nextends Object\n\n\n`\n\n`\n\n\n`\n\n|---|-----------------------------------------------------------------------------------------|\n| java.lang.Object ||\n| ↳ | android.support.v4.hardware.fingerprint.FingerprintManagerCompat.AuthenticationCallback |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nCallback structure provided to [authenticate(CryptoObject, int, CancellationSignal, AuthenticationCallback, Handler)](/reference/android/support/v4/hardware/fingerprint/FingerprintManagerCompat#authenticate(android.support.v4.hardware.fingerprint.FingerprintManagerCompat.CryptoObject, int, android.support.v4.os.CancellationSignal, android.support.v4.hardware.fingerprint.FingerprintManagerCompat.AuthenticationCallback, android.os.Handler)). Users of [authenticate(CryptoObject, int, CancellationSignal, AuthenticationCallback, Handler)](/reference/android/support/v4/hardware/fingerprint/FingerprintManagerCompat#authenticate(android.support.v4.hardware.fingerprint.FingerprintManagerCompat.CryptoObject, int, android.support.v4.os.CancellationSignal, android.support.v4.hardware.fingerprint.FingerprintManagerCompat.AuthenticationCallback, android.os.Handler)) must provide an implementation of this for listening to\nfingerprint events.\n\nSummary\n-------\n\n| ### Public constructors ||\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ` `[FingerprintManagerCompat.AuthenticationCallback](/reference/android/support/v4/hardware/fingerprint/FingerprintManagerCompat.AuthenticationCallback#FingerprintManagerCompat.AuthenticationCallback())`() ` |\n\n| ### Public methods ||\n|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` void` | ` `[onAuthenticationError](/reference/android/support/v4/hardware/fingerprint/FingerprintManagerCompat.AuthenticationCallback#onAuthenticationError(int, java.lang.CharSequence))`(int errMsgId, CharSequence errString) ` Called when an unrecoverable error has been encountered and the operation is complete. |\n| ` void` | ` `[onAuthenticationFailed](/reference/android/support/v4/hardware/fingerprint/FingerprintManagerCompat.AuthenticationCallback#onAuthenticationFailed())`() ` Called when a fingerprint is valid but not recognized. |\n| ` void` | ` `[onAuthenticationHelp](/reference/android/support/v4/hardware/fingerprint/FingerprintManagerCompat.AuthenticationCallback#onAuthenticationHelp(int, java.lang.CharSequence))`(int helpMsgId, CharSequence helpString) ` Called when a recoverable error has been encountered during authentication. |\n| ` void` | ` `[onAuthenticationSucceeded](/reference/android/support/v4/hardware/fingerprint/FingerprintManagerCompat.AuthenticationCallback#onAuthenticationSucceeded(android.support.v4.hardware.fingerprint.FingerprintManagerCompat.AuthenticationResult))`(`[FingerprintManagerCompat.AuthenticationResult](/reference/android/support/v4/hardware/fingerprint/FingerprintManagerCompat.AuthenticationResult)` result) ` Called when a fingerprint is recognized. |\n\n| ### Inherited methods |\n|-----------------------|---|\n| From class ` java.lang.Object ` |-------------------|-------------------------------| | ` Object` | ` clone() ` | | ` boolean` | ` equals(Object arg0) ` | | ` void` | ` finalize() ` | | ` final Class\u003c?\u003e` | ` getClass() ` | | ` int` | ` hashCode() ` | | ` final void` | ` notify() ` | | ` final void` | ` notifyAll() ` | | ` String` | ` toString() ` | | ` final void` | ` wait(long arg0, int arg1) ` | | ` final void` | ` wait(long arg0) ` | | ` final void` | ` wait() ` | ||\n\nPublic constructors\n-------------------\n\n### FingerprintManagerCompat.AuthenticationCallback\n\nadded in [version 24.1.0](/topic/libraries/support-library/revisions) \n\n```\nFingerprintManagerCompat.AuthenticationCallback ()\n```\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nPublic methods\n--------------\n\n### onAuthenticationError\n\nadded in [version 24.1.0](/topic/libraries/support-library/revisions) \n\n```\nvoid onAuthenticationError (int errMsgId, \n CharSequence errString)\n```\n\nCalled when an unrecoverable error has been encountered and the operation is complete.\nNo further callbacks will be made on this object.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|-------------|------------------------------------------------------------------------------|\n| `errMsgId` | `int`: An integer identifying the error message \u003cbr /\u003e |\n| `errString` | `CharSequence`: A human-readable error string that can be shown in UI \u003cbr /\u003e |\n\n### onAuthenticationFailed\n\nadded in [version 24.1.0](/topic/libraries/support-library/revisions) \n\n```\nvoid onAuthenticationFailed ()\n```\n\nCalled when a fingerprint is valid but not recognized.\n\n\u003cbr /\u003e\n\n### onAuthenticationHelp\n\nadded in [version 24.1.0](/topic/libraries/support-library/revisions) \n\n```\nvoid onAuthenticationHelp (int helpMsgId, \n CharSequence helpString)\n```\n\nCalled when a recoverable error has been encountered during authentication. The help\nstring is provided to give the user guidance for what went wrong, such as\n\"Sensor dirty, please clean it.\"\n\n\u003cbr /\u003e\n\n| Parameters ||\n|--------------|------------------------------------------------------------------------|\n| `helpMsgId` | `int`: An integer identifying the error message \u003cbr /\u003e |\n| `helpString` | `CharSequence`: A human-readable string that can be shown in UI \u003cbr /\u003e |\n\n### onAuthenticationSucceeded\n\nadded in [version 24.1.0](/topic/libraries/support-library/revisions) \n\n```\nvoid onAuthenticationSucceeded (FingerprintManagerCompat.AuthenticationResult result)\n```\n\nCalled when a fingerprint is recognized.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|----------------------------------------------------------------------------------------------------------|\n| `result` | `FingerprintManagerCompat.AuthenticationResult`: An object containing authentication-related data \u003cbr /\u003e |\n\n-\n\n Classes\n -------\n\n - [FingerprintManagerCompat](/reference/android/support/v4/hardware/fingerprint/FingerprintManagerCompat)\n - [FingerprintManagerCompat.AuthenticationCallback](/reference/android/support/v4/hardware/fingerprint/FingerprintManagerCompat.AuthenticationCallback)\n - [FingerprintManagerCompat.AuthenticationResult](/reference/android/support/v4/hardware/fingerprint/FingerprintManagerCompat.AuthenticationResult)\n - [FingerprintManagerCompat.CryptoObject](/reference/android/support/v4/hardware/fingerprint/FingerprintManagerCompat.CryptoObject)"]]