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
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):
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.