0

I'm busy working with an android device that has a physical barcode scanner built in. I need to access this scanner and scan a PDF417 barcode (like a drivers license).

I found that this to some extent registered as a keyboard, meaning I can get some form of input through the override onKeyDown events. Though, when I try and read this data, is comes back as an encoded string or as a replacement character (special character or the diamond with the question mark).

The code looks something like this:

image

What I need, is for the result to show me what the value is of the barcode I'm scanning.

This is what I'm currently getting:

image2

RetroD
  • 1
  • 2
  • What encoding is the scanner's data in, and what encoding do you want for your output? – Michael Dec 07 '17 at 13:17
  • Thats one of the problems - I really don't know what the encoding is. I have very little documentation to work off of. As for output, I just need it in plain readable text. – RetroD Dec 07 '17 at 13:22
  • Did you check if it matches any of the encodings [listed on the wikipedia page](https://en.wikipedia.org/wiki/PDF417)? Also, it's not entirely clear what _"plain readable text"_ means. I could imagine multiple readable text encodings of a barcode. – Michael Dec 07 '17 at 13:26

1 Answers1

0

Watch carefully setting up your scanner. The problem is not in the application. In the scanner, you can still add a special of carriage so that the machine will trigger an event onKeyDown