Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compat dialog shows previously cancelled error #10

Open
nealsanche opened this issue Sep 10, 2018 · 1 comment
Open

Compat dialog shows previously cancelled error #10

nealsanche opened this issue Sep 10, 2018 · 1 comment

Comments

@nealsanche
Copy link

To replicate:

  1. Show dialog, but hit cancel.
  2. Show dialog again (on a device that needs compat, like API27 emulator), will see the cancelled error from the previous invocation.

Here's a video that demonstrates what we see:

2018-09-10_11-26-17

Creation code looks like:

val prompt = BiometricPromptCompat.Builder(context)
                .setTitle(context.getString(R.string.biometrics_enroll_title))
                .setDescription(context.getString(R.string.biometrics_enroll_subtitle))
                .setNegativeButton(context.getString(R.string.biometrics_cancel)) { dialogInterface, _ ->
                    dialogInterface?.let {
                        dialogInterface.cancel()
                        dialogInterface.dismiss()
                    }
                    emitter.onError(DomainException(DomainError.BIOMETRICS_CANCELLED_BY_USER))
                }
                .build()

Maybe it's my negative button handling there, which calls cancel and then dismiss?

@fython
Copy link
Owner

fython commented Sep 14, 2018

Maybe I need to write some code to clear the status (of FingerprintManager) each BiometricPrompt's beginning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants