Skip to content

Wrong behaviour in Android 10 with disablebackup false #417

@andreszs

Description

@andreszs

Bug report

The .show method seems to be flawed in Android 10.

Behavior in Android 7/8/9

  • Dialog invoked with disablebackup=false shows fallback button to use PIN/PATTERN/ETC.
  • Pressing BACKBUTTON to cancel correctly dismisses the dialog.

image

Behavior in Android 10 (Samsung, Redmi)

  • Dialog invoked with disablebackup=false shows a CANCEL button instead of fallback button.
  • Pressing CANCEL shows a second dialog with the fallback button that should have been shown to begin with.

image

BiometricPrompt.PromptInfo.Builder notice

The setDeviceCredentialAllowed method shows this warning:

On versions prior to Android 10 (API 29), calls to BiometricPrompt.cancelAuthentication() will not work as expected after the user has chosen to authenticate with their device credential. This is because the library internally launches a separate activity (by calling KeyguardManager.createConfirmDeviceCredentialIntent(CharSequence, CharSequence)) that does not have a public API for cancellation.

The reality check shows the exact opposite, behaviour with setDeviceCredentialAllowed(true) does work as expected UNTIL Android 10 which duplicates the dialogs. And cancelling the pattern/pin dialog corrrectly returns a BIOMETRIC_DISMISSED failure callback.

Plugin demo app

To easily test this plugin, I've created and uploaded a small Fingerprint Plugin demo app. Kindly let me know if this behavior persists in your Android 10+ phones.

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions