androidmotorola-emdk

Zebra scanner emdk integration


I am adding zebra scanning sdk to my app. I see that when camera is open, the hardware scanner does not work. I have implemented Scanner.StatusListener but I see that this is not invoked when camera is open. I am seeing a way to know when user clicks the hardware button when camera is open to show them a toast. How can I get that callback


Solution

  • Unfortunately it is not possible to use both the camera and the scanner within the same app because of a low level hardware dependency (even if you are using the 2D imager for scanning, rather than the camera, this hardware dependency exists). There is no easy way to programmatically determine that the user has pressed the trigger in this scenario, to display the toast as you say, the only way I can think of would be for your app to remap the trigger to some other action using the KeyMapping Manager and then revert the trigger back to its original behaviour when the camera is dismissed. Rather than try to manage the EMDK enabling & disabling when the camera is used I would recommend using DataWedge for scanning in your app, you still can't do scanning when the camera is displayed but it should make your application logic simpler