ZebraDevs / DataWedge-Ionic-Demo

Demo Ionic application using Datawedge on Zebra mobile devices
Other
43 stars 21 forks source link

scans not being recorded #12

Closed invot closed 4 years ago

invot commented 4 years ago

I've implemented the Transition to WebIntent branch into my own project (using Ionic v4) pretty easily. I know I am connected to my Zebra device's laser scanner since pressing the fab button in the example code results in the laser turning on and off (and the SOFT_SCAN_TRIGGER event is logged).

However, no scans are pushed into the scans array using either this software button or the hardware buttons on the device.

I'm wondering how to fix this, or what I'm doing wrong. I've looked at the API documentation, and see things like ACTION and RESULT_ACTION methods, but don't see examples in JavaScript. I have a feeling I need to use your sendCommand() method, but don't see a clear example of how to use it.

I'm wondering if there's an example somewhere of a scan request (triggered by a hardware button) and capture, in JavaScript/Typescript, floating around somewhere, that also would play nice with Ionic. Any examples of a simple scan function would be TREMENDOUSLY helpful here.

darryncampbell commented 4 years ago

This sample app will display scanned results that are received via the broadcast receiver registered at https://github.com/Zebra/ZebraIonicDemo/blob/Transition_To_WebIntent/src/providers/barcode/barcode.ts#L17. If you do not see scans appearing you should double check the DataWedge profile is correct, there is a screenshot at https://raw.githubusercontent.com/Zebra/ZebraIonicDemo/Transition_To_WebIntent/screenshots/profile_output.png or please also see the ReadMe file for more info, https://github.com/Zebra/ZebraIonicDemo/blob/Transition_To_WebIntent/README.md

invot commented 4 years ago

I've been searching everywhere for this configuration screen, not realizing my test device had it blocked for some reason. So sorry about that.