Home android Emulating Fingerprint in Android Emulator

Emulating Fingerprint in Android Emulator

7859
0
Android Emulators are simply the best way to test our application during development or when we want to use apps on PC. Currently fingerprint smartphones are not that common, but surely it will become one of the basic features like Bluetooth or Camera. So it is necessary to start making maximum use of the fingerprint scanner.
Android Fingerprint Prompt
When i started developing applications with fingerprint scanner, i had to find a way to emulate the scanner in my emulator. Thanks to Android Developer website.
Before explaining how to Emulate a fingerprint scanner, you have to make sure that the following requirements are satisfied in your system.
  • Currently, the Fingerprint API is only supported from Marshmallow. Make sure your emulator is running on Android M (API 23) or better.
  • Android SDK Tools Revision 24.3 or better.
Watch my video on How to use fingerprint for emulator

Steps for adding FingerPrint in Android Emulator

  • Activate Screenlock from Settings -> Security. Then Go to Fingerprint option to add new fingerprint

  • When prompt to place your finger on the scanner, emulate the fingerprint using adb command.
Android Fingerprint Authentication
adb -e emu finger touch <finger_id>
#Example
adb -e emu finger touch 1155aa1155

 

  • You should see fingerprint detected message. That’s it. Done.
 
  • Whenever an application prompts for fingerprint, just use the previously used adb command with the given finger_id to authenticate.