11

Some new android devices come with on-screen fingerprint sensors
Here are bunch of them: https://www.smartprix.com/bytes/7-best-phones-with-under-display-fingerprint-sensor/

During fingerprint authentication the icon appears on screen, where user can put his finger on. Like this one:
enter image description here

This cause some troubles with overlapping screen contents with this icon (like pin-keyboard)

Is there some way in android's API to define:

  1. If device has on-screen fingerprint
  2. Then, if has, it's coordinates on the screen
repitch
  • 1,858
  • 1
  • 15
  • 34
  • I have added latest biometric api on top of fragment and added condition that background controls on frag should not be accesible till authentication. But the issue in onscreen sensor is user can still access the background controls on the fragment and fingerprint overlay is on all the screens. – Ravi Yadav Jul 06 '20 at 07:20

1 Answers1

2

No, sorry, in the current Android SDK, there is nothing for either of these.

This cause some troubles with overlapping screen contents with this icon (like pin-keyboard)

Since fingerprints should not be collected except when you specifically request it (e.g., via BiometricPrompt), and since that has its own UI, my hope is that you should not run into any situation where the fingerprint sensor interferes with existing UI.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • Yep, BiometricPrompt is what we'll be going to use. But it's supported from api28. Is there any devices, that are lower than api28, and has on-screen fingerprint? Or this hardware feature is available only on api28? – repitch Feb 04 '19 at 12:49
  • @repitch: "But it's supported from api28" -- `FingerprintManager` would be the predecessor, and it too displays its own UI. "Is there any devices, that are lower than api28, and has on-screen fingerprint?" -- I have no idea, sorry. – CommonsWare Feb 04 '19 at 13:01
  • Thanks! I found those devices: Vivo V11, Vivo X21, Oppo R17 Pro with android lower than 28 – repitch Feb 04 '19 at 13:15
  • _"`FingerprintManager` would be the predecessor, and it too displays its own UI"_. `FingerprintManager` doesn't show any UI - it's up to the calling app to do that. There's a backwards compatible version of `BiometricPrompt` though (in `androidx.biometrics`). – Michael Feb 06 '19 at 06:55
  • @Michael: Sorry, I meant `FingerprintDialog`. – CommonsWare Feb 06 '19 at 12:10
  • 1
    This becomes a problem when using `KeyguardManager` and `createConfirmDeviceCredentialIntent` because the fingerprint overlaps the keyboard and the app has no control over the activity. Has anyone come across this and found a solution when using `createConfirmDeviceCredentialIntent`? – Neal Stublen Mar 15 '19 at 12:59
  • @Michael, I got some issue related to error display when using `androidx.biometrics` api with rear and in-dispaly finger print sensor. I have raised ticket [**here**](https://stackoverflow.com/q/57493822/2624806), could you please check if you have any finding around ? – CoDe Aug 21 '19 at 10:46