Coder Social home page Coder Social logo

biometricpromptcompat's Introduction

燒餅(Siubeng)

  • Communication language: 💬Cantonese, Mandarin, English. Learning Japanese
  • Most used: Golang, TypeScript, Rust, Kotlin
  • Interest: DevOps, Music, Anime & Games, Android

Recent works / 最近工作

For past works see here.

If you like my projects, you can buy me a coffee at afdian.net <3

biometricpromptcompat's People

Contributors

drakeet avatar fython avatar siczmj avatar tougee avatar yuriiostrovskyi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

biometricpromptcompat's Issues

Biometric dialog not dismiss when Too many attempts error occured.

I think it's better to cancel Biometric dialog when onAuthenticationError method called. e.g:- when user try more than 5 wrong fingerprint, an error occured Too many attempts, Fingerprint Sensor disabled. At this time Biometric dialog should be dismiss instead of showing error.

Accept fingerprint even after cancel the dialog

After click on USE PASSWORD Biometric dialog disappears and show you requested password Toast but accept fingerprint at the same time.
Bug reproduce steps : -
1- click on USE PASSWORD
2- Biometric Dialog disappears
3- Now touch fingerprint senser Its accept fingerprint and show Success Toast.
Tested on Nexus 6P, Android version 8.1.0

Compat dialog shows previously cancelled error

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?

Dialog will dismiss after rotating screen (Api23Impl)

Dialog cannot keep its state after rotating screen. Most of time, we use DialogFragment to solve this problem. But it will break original-like API style (Need developers to add Fragment to FragmentManager by themselves.).

I have implemented a simple version of DialogFragment for BiometricPromptApi23Impl which is still undocumented: AbstractBiometricPromptDialogFragment. I think I should make it easier to use before releasing it.

If you have any idea, welcome to comment here.


中文:

Dialog 不能在旋转屏幕后保持它的状态。大多时候我们会使用 DialogFragment 来解决这个问题,但它会破坏类原生接口的风格(需要开发者自行将 Fragment 加入 FragmentManager)。

我已经为 BiometricPromptApi23Impl 实现了一个未记入文档的简单版本 Fragment ——AbstractBiometricPromptDialogFragment。我想我应该让它更易于使用再发布。

如果你有任何点子,欢迎在此发表评论。

Leaked window DecorView

I'm getting this error:

2018-06-27 16:03:38.323 27998-27998/com.mypossibleself.app E/WindowManager: android.view.WindowLeaked: Activity com.example.SecurityEntryActivity has leaked window DecorView@1635e7a[Security] that was originally added here
        at android.view.ViewRootImpl.<init>(ViewRootImpl.java:572)
        at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:331)
        at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:97)
        at android.app.Dialog.show(Dialog.java:419)
        at moe.feng.support.biometricprompt.BiometricPromptApi23Impl.authenticate(BiometricPromptApi23Impl.java:133)
        at moe.feng.support.biometricprompt.BiometricPromptCompat.authenticate(BiometricPromptCompat.java:107)

It's triggering when trying to call biometricPrompt.authenticate.

It's only on some phones and only occasionally.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.