BlueFletch / motorola-datawedge-cordova-plugin

This is a Cordova/Phonegap plugin to interact with Motorola ruggedized Android devices' Barcode Scanners and Magnetic Stripe Readers (eg, ET1, TC55, MC40). The plugin works by interacting with the "DataWedge" application configured to output scan and magstripe read events.
35 stars 38 forks source link

Support for 'Zebra' devices #24

Closed novarx closed 5 years ago

novarx commented 5 years ago

Reason

Devices of the brand 'Zebra' somehow use a slightly different DataWedge-API. So, if an incoming intent gets triggered, nothing will happen – especially in DataWedgeIntentHandler.dataReceiver(). However the start() and stop() functions are working.

Fix

I’ve added an check in the overridden initialize() function of the DataWedgeIntentHandler. It’s now possible to add an Tag in the Android-Manifest which specifies the bas URI of the DataWedge app.

Code Sample

AndroidManifest.xml

<?xml [...]?>
<manifest [...]>
    <application [...]>
        [...]
        <meta-data android:name="com.bluefletch.motorola.datawedge.BASEURI" android:value="com.symbol.datawedge" />
    </application>
    [...]
</manifest>

Sources

Zebra DataWedge-API Zebra DataWedge Doc


Appx.: Thanks for the plugin, thats some nice work! Let me know if I can help you any futher.