2

is there a way to force a ZXing.NET app to use the built in laser scanner on a device instead of the camera? I have a client using the Android TC55 for scanning bar codes and the main requirement is bar code scanning using the built in laser. The do not want the scan using the built in camera at all.

The device has DataWedge functionality so maybe there is a way to access the scanner that way? Any information would be appreciated.

larryc19
  • 31
  • 4
  • if the device has a built in scanner then you shouldn't need to use ZXing at all. "tc55 scanner api" turns up several interesting hits. – Jason Apr 03 '17 at 21:32
  • Thanks, I have looked at that option as a last resort This is an existing app that has several hooks into the ZXing.NET libraries and I was hoping to avoid a rewrite. – larryc19 Apr 03 '17 at 21:37

2 Answers2

2

There is no way I'm afraid since ZXing is released under Apache and the TC55 only offers APIs under a propriety license (so ZXing would never interface without modification). I wrote a form of shim layer to expose an intent interface on top of native Android for both ZXing and the Zebra APIs, https://github.com/darryncampbell/GenericScanWedge, but that does not fit what you're trying to do as it's not .NET and would require app modification.

Darryn Campbell
  • 1,441
  • 10
  • 13
1

I think for TC55 there is its EMDK, There is a porting for Xamarin

You could try to take a look to this sample

XAMARIN Barcode Scanner

The Activity of the Android project use the Profile API to configure DataWedge to read EAN13 and CODE128 barcodes and to send the data with a Broadcast intent. This configuration is assigned to the activity itself (com.pietromaggi.sample,barcodeForms.MainActivity).

The Form uses a DependencyService to send a DataWedge intent (the interface is in the Portable library, I've implemented only the Android side).

A broadcast receiver is implemented to handle the Intent coming from DataWedge, this receiver is registered in the MainActivity and an event handler is registered there to handle the received data,

The event handler uses the MessagingCenter to send the data to the Form so that it can display the data. (If you need to send data to Xamarin Forms app)

Alessandro Caliaro
  • 5,623
  • 7
  • 27
  • 52