2

I have an app that reads barcode input from a scanner. The scanner is treated as a keyboard (as usual) and I get the scanned input while my app has focus. However durting periods of inactivity my app is killed and then misses any input that may occur.

Since the scanner is a usb device it should be possible to associate it exclusively with my app. I have a usb printer and that is associated with my app by default. So the OS starts my app (if needed) on the USB_ATTACH event of the printer.

How do I get the scanner to be associated by default with my app and ensure my app gets any input from the scanner?

nan12
  • 39
  • 2
  • Perhaps this would help http://stackoverflow.com/questions/1733195/android-intent-filter-for-a-particular-file-extension – Steven Huang Jul 01 '13 at 18:15
  • That refers to a file type. In this case it is a usb device and additionally detected by default as a keyboard -which automatically means available to all apps – nan12 Jul 16 '13 at 07:06

0 Answers0