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

5

14

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.

Zennas answered 10/11, 2019 at 17:45 Comment(4)
Did you find any solution? Have you tried with Production Build?Urita
Have to try using npm install face-recognition-react-native --save npm?Cristobal
@pravin i know its late reply answer but if u delete your finger prints from device it will show allow you to use face id because face id is considered as a weak biometric in android 10Atone
@ShivarajRajagolkar no its not workingWesterly
N
3

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

Nullity answered 7/1, 2020 at 22:20 Comment(0)
F
1

My straight answer would be NO. The justification for that is because Android has never shipped FaceID/Face unlock from its own in the Stock version or core API. The Face ID/Face unlock solutions we get in android are from vendors which they have indulged in android on top of the core APIs as third-party integration and I assume no one can write an interface on top of hundreds of different implementations to support such feature from a single API.

Fruit answered 8/1, 2020 at 6:5 Comment(0)
T
0

Refer to this answer

react-native-touch-id should work for both TouchID and FaceID.

Refer to this documentation

This package requires a compiled SDK version of 29 (Android 10.0) or higher

this might be indicate that it will work only on android 10 or higher.

Thrush answered 10/1, 2020 at 8:22 Comment(1)
i have android 12 on Samsung still not showing face unlock also my compile SDK is 32Whinstone
J
0

From my recent research it seems that expo-local-authentication works with face recognition, but only if device has fingerprint authentication hardware also.

Expo-local-authentication function supportedAuthenticationTypesAsync() returns always only information about AuthenticationType.FINGERPRINT even if facial recognition is also available on android device. Despite that it works properly even if device with fingerprint hardware doesn't have fingerprint data and has only face data. Then expo-local-authentication use face unlock.

Problem happens when android device doesn't have fingerprint hardware, but have face recognition availability. Then supportedAuthenticationTypesAsync() returns only undefined and authenticateAsync() doesn't work.

Here is snack created for testing: https://snack.expo.dev/-Y34x2K7- But you will need a device with such hardware.

I prepared precise question here to find solution for case with android devices with face recognition unlock but without fingerprint unlock here: Face Id, biometry, face recognition unlock on Android devices in React Native

Justness answered 23/8, 2022 at 11:19 Comment(0)
W
-1

using lib react-native-biometrics support touchid & faceid for Android

Weizmann answered 10/1, 2022 at 8:3 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewDeannedeans

© 2022 - 2024 — McMap. All rights reserved.