In this tutorial, we will learn how to simulate a fingerprint sensor touch on the Android Studio emulator. This is useful if you want to test fingerprint authentication in your Android app without a physical device.
The feature is hidden in the extended controls (More) of the Android emulator and available on Android Marshmallow (API 23) and higher. In the Fingerprint section, we can find a “Touch The Sensor” button and a dropdown menu where we can choose between 10 different fingers (Finger 1 through 10). Those are different virtual fingers, which means that we can use them to simulate failed authentication through an invalid fingerprint, or to enroll multiple fingerprints on the virtual device.
To use fingerprint authentication, we first have to register at least one fingerprint in the emulator’s security settings and choose a backup method, like PIN or pattern, just like on a real phone.