Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can we get face-id in react native for Android devices?

I was implementing biometrics in my app for authentication. I am using react-native biometrics for it. Every things working good just one stucked. Face-id is not working in Android. I did a lot of googling but unable to find some satisfactory answer. Is it even possible to use face-id in Android?

Biometrics.isSensorAvailable()
  .then((biometryType) => {
    if (biometryType === Biometrics.TouchID) {
      console.log('TouchID is supported')
    } else if (biometryType === Biometrics.FaceID) {
      console.log('FaceID is supported')
    } else {
      console.log('Biometrics not supported')
    }
  })  

This always return me TouchId even if I am using FaceId in my phone. Thank for help in advance.

like image 518
Bhaskar Joshi Avatar asked Nov 10 '19 17:11

Bhaskar Joshi


People also ask

How do you add NSFaceIDUsageDescription?

plist must contain an NSFaceIDUsageDescription key with a string value explaining to the user how the app uses this data. Simply adding NSFaceIDUsageDescription by right clicking and "Add Row" in the root of the Info. plist and pasted NSFaceIDUsageDescription in and set it to YES.


1 Answers

I think this is because Face-Id and Touch-Id are iOS only. and you still seem to get Touch-Id working as Biometrics on android defaults to what you are using for your lock screen (sometimes it also depends on your device manufacturer) I got this info from here

like image 167
Amitoj Singh Avatar answered Sep 30 '22 02:09

Amitoj Singh