skip to Main Content

I’m a newbie to flutter and am trying to implement a biometric functionality. A part of which requires me to scan and then transmit the biometric data to another device via BLE. For which I need to scan the fingerprint of the user than maybe store it in some sort of a temp list/array/variable and then send it whole to the connected BLE Device.

I noticed a few packages like local_auth who tend to as per my understanding "compare" the users finger print with the ones already available in the system to provide authentication. I don’t want that kind of a functionality.

Is there a way I can achieve the thing I mentioned?

Thanks.

2

Answers


  1. I don’t think this is possible on Android. I would be very surprised if it is possible to extract the biometric data. I also found this article that explains how biometrics work on Android (emphasis mine):

    The key requirement in Android is that fingerprint biometrics have to be stored in the Trusted Execution Environment (TEE). This means that the biometric information is encrypted and stored in a separate part of the smartphone, completely inaccessible to the regular operating system. They can’t even be exported. Android can ask the TEE to validate an identity using biometrics, but cannot extract the biometric information. This means that when the user stores their biometric information, such as a fingerprint, they are not sharing that information outside of their own smartphone or tablet. They are just establishing a way to identify themselves to their device.

    Login or Signup to reply.
  2. You can’t directly access raw fingerprint data in Flutter because both Android and iOS keep biometric data private and only allow apps to verify users, not retrieve their data. However, there’s a straightforward workaround to achieve similar functionality.

    Solution
    Use Biometric Authentication: First, authenticate the user’s fingerprint with local_auth. If the fingerprint matches, this confirms their identity without actually exposing the raw data.

    Send a Secure Token Over BLE: Instead of sending fingerprint data, you can send a unique token or message to the Bluetooth (BLE) device, which acts as proof that the user is verified. You can handle this Bluetooth connection using a package like flutter_reactive_ble.

    Quick Summary
    Biometric data can’t be accessed directly—it’s locked down for privacy.
    Workaround: Authenticate the user with biometrics and send a secure token as a stand-in for the fingerprint.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search