16

I have an Android fingerprint implementation working and I was looking to add UI tests with Espresso. One problem I can't find a solution to is how to emulate the scanning of a finger. There is an adb command adb -e emu finger touch which should work on emulators.

Any idea on how to integrate something like that with Espresso?

QuirijnGB
  • 791
  • 1
  • 7
  • 18

1 Answers1

1

From this question sending to an emulator is possible:

Runtime.getRuntime().exec("adb -e emu finger touch 1")

I expect, though can't show any working, that faking a fingerprint on a real device would require some special kind of security magic.

Edit: this doesn't work from within espresso tests.

jamesh
  • 18,935
  • 13
  • 54
  • 96