/**@class android.hardware.biometrics.BiometricPrompt implements android.hardware.biometrics.BiometricAuthenticator implements android.hardware.biometrics.BiometricConstants @extends java.lang.Object A class that manages a system-provided biometric dialog. */ var BiometricPrompt = { /** @hide */ KEY_TITLE : "title", /** @hide */ KEY_USE_DEFAULT_TITLE : "use_default_title", /** @hide */ KEY_SUBTITLE : "subtitle", /** @hide */ KEY_DESCRIPTION : "description", /** @hide */ KEY_POSITIVE_TEXT : "positive_text", /** @hide */ KEY_NEGATIVE_TEXT : "negative_text", /** @hide */ KEY_REQUIRE_CONFIRMATION : "require_confirmation", /** @hide */ KEY_ALLOW_DEVICE_CREDENTIAL : "allow_device_credential", /** @hide */ KEY_FROM_CONFIRM_DEVICE_CREDENTIAL : "from_confirm_device_credential", /** Error/help message will show for this amount of time. For error messages, the dialog will also be dismissed after this amount of time. Error messages will be propagated back to the application via AuthenticationCallback after this amount of time. @hide */ HIDE_DIALOG_DELAY : "2000", /** @hide */ DISMISSED_REASON_POSITIVE : "1", /** @hide */ DISMISSED_REASON_NEGATIVE : "2", /** @hide */ DISMISSED_REASON_USER_CANCEL : "3", /**Authenticates for the given user. @param {Object {CancellationSignal}} cancel An object that can be used to cancel authentication @param {Object {Executor}} executor An executor to handle callback events @param {Object {BiometricPrompt.AuthenticationCallback}} callback An object to receive authentication events @param {Number} userId The user to authenticate @hide */ authenticateUser : function( ) {}, /**This call warms up the biometric hardware, displays a system-provided dialog, and starts scanning for a biometric. It terminates when {@link android.hardware.biometrics.BiometricAuthenticator.AuthenticationCallback#onAuthenticationError(int, CharSequence)} is called, when {@link android.hardware.biometrics.BiometricAuthenticator.AuthenticationCallback#onAuthenticationSucceeded( AuthenticationResult)}, or when the user dismisses the system-provided dialog, at which point the crypto object becomes invalid. This operation can be canceled by using the provided cancel object. The application will receive authentication errors through {@link android.hardware.biometrics.BiometricAuthenticator.AuthenticationCallback}, and button events through the corresponding callback set in {@link android.hardware.biometrics.BiometricPrompt.Builder#setNegativeButton(CharSequence, Executor, DialogInterface.OnClickListener)}. It is safe to reuse the {@link android.hardware.biometrics.BiometricPrompt} object, and calling {@link BiometricPrompt#authenticate( CancellationSignal, Executor, android.hardware.biometrics.BiometricAuthenticator.AuthenticationCallback)} while an existing authentication attempt is occurring will stop the previous client and start a new authentication. The interrupted client will receive a cancelled notification through {@link android.hardware.biometrics.BiometricAuthenticator.AuthenticationCallback#onAuthenticationError(int, CharSequence)}. Note: Applications generally should not cancel and start authentication in quick succession. For example, to properly handle authentication across configuration changes, it's recommended to use BiometricPrompt in a fragment with setRetainInstance(true). By doing so, the application will not need to cancel/restart authentication during the configuration change. @param {Object {BiometricPrompt.CryptoObject}} crypto Object associated with the call @param {Object {CancellationSignal}} cancel An object that can be used to cancel authentication @param {Object {Executor}} executor An executor to handle callback events @param {Object {BiometricPrompt.AuthenticationCallback}} callback An object to receive authentication events @param callback An object to receive authentication events */ authenticate : function( ) {}, /**This call warms up the biometric hardware, displays a system-provided dialog, and starts scanning for a biometric. It terminates when {@link android.hardware.biometrics.BiometricAuthenticator.AuthenticationCallback#onAuthenticationError(int, CharSequence)} is called, when {@link android.hardware.biometrics.BiometricAuthenticator.AuthenticationCallback#onAuthenticationSucceeded( AuthenticationResult)} is called, or when the user dismisses the system-provided dialog. This operation can be canceled by using the provided cancel object. The application will receive authentication errors through {@link android.hardware.biometrics.BiometricAuthenticator.AuthenticationCallback}, and button events through the corresponding callback set in {@link android.hardware.biometrics.BiometricPrompt.Builder#setNegativeButton(CharSequence, Executor, DialogInterface.OnClickListener)}. It is safe to reuse the {@link android.hardware.biometrics.BiometricPrompt} object, and calling {@link BiometricPrompt#authenticate(CancellationSignal, Executor, android.hardware.biometrics.BiometricAuthenticator.AuthenticationCallback)} while an existing authentication attempt is occurring will stop the previous client and start a new authentication. The interrupted client will receive a cancelled notification through {@link android.hardware.biometrics.BiometricAuthenticator.AuthenticationCallback#onAuthenticationError(int, CharSequence)}. Note: Applications generally should not cancel and start authentication in quick succession. For example, to properly handle authentication across configuration changes, it's recommended to use BiometricPrompt in a fragment with setRetainInstance(true). By doing so, the application will not need to cancel/restart authentication during the configuration change. @param {Object {CancellationSignal}} cancel An object that can be used to cancel authentication @param {Object {Executor}} executor An executor to handle callback events @param {Object {BiometricPrompt.AuthenticationCallback}} callback An object to receive authentication events @param callback An object to receive authentication events */ authenticate : function( ) {}, };