1

I have a generic credit card reader that is detected as a USB keyboard. I tested it out by simply using a text view to capture the text.

I was wondering if there what would be the best of of implementing it so you do not need an active text field (e.g. capture generic keyboard events through console input stream buffers like what I use in the desktop version of the card reader):

Console console = System.console();
String inputData = new String (console.readPassword());
DantheMan
  • 7,247
  • 10
  • 33
  • 36
  • I'm curious if you've had much luck with this device, and if you're happy with it, what brand it is. – Yevgeny Simkin Apr 26 '12 at 01:00
  • what did you find so far , I have a generic card reader , I want to get it work using android , please share the way you got it work with the android – A.s.ALI Sep 26 '16 at 12:32

1 Answers1

1

The View class has a method called setOnKeyListener which should be useful to you.

kabuko
  • 36,028
  • 10
  • 80
  • 93