DataWedgeReactNative not working on a newer Zebra device with DW 7.0.4

I'm having the same issue with DataWedgeReactNative with Data Wedge 7.0.4

Is there anything that I need to do differently for DW version 7.0.4 in config or code?

The scanner turns on and makes a beep as if it has registered the barcode, but then it never hit this line:
this.barcodeScanned(intent, new Date().toLocaleString());

!intent.hasOwnProperty('RESULT_INFO') is always false.

Any ideas what I might be doing wrong?

(see broadcastReceiver below)
------

broadcastReceiver(intent)
{
// Broadcast received
console.log('Received Intent: ' + JSON.stringify(intent));
if (intent.hasOwnProperty('RESULT_INFO')) {
var commandResult = intent.RESULT + " (" +
intent.COMMAND.substring(intent.COMMAND.lastIndexOf('.') + 1, intent.COMMAND.length) + ")";// + JSON.stringify(intent.RESULT_INFO);
this.commandReceived(commandResult.toLowerCase());
}

if (intent.hasOwnProperty('com.symbol.datawedge.api.RESULT_GET_VERSION_INFO')) {
// The version has been returned (DW 6.3 or higher). Includes the DW version along with other subsystem versions e.g MX
var versionInfo = intent['com.symbol.datawedge.api.RESULT_GET_VERSION_INFO'];
console.log('Version Info: ' + JSON.stringify(versionInfo));
var datawedgeVersion = versionInfo['DATAWEDGE'];
console.log("Datawedge version: " + datawedgeVersion);

// Fire events sequentially so the application can gracefully degrade the functionality available on earlier DW versions
if (datawedgeVersion >= "6.3")
this.datawedge63();
if (datawedgeVersion >= "6.4")
this.datawedge64();
if (datawedgeVersion >= "6.5")
this.datawedge65();

//this.setState(this.state);
}
else if (intent.hasOwnProperty('com.symbol.datawedge.api.RESULT_ENUMERATE_SCANNERS')) {
// Return from our request to enumerate the available scanners
var enumeratedScannersObj = intent['com.symbol.datawedge.api.RESULT_ENUMERATE_SCANNERS'];
this.enumerateScanners(enumeratedScannersObj);
}
else if (intent.hasOwnProperty('com.symbol.datawedge.api.RESULT_GET_ACTIVE_PROFILE')) {
// Return from our request to obtain the active profile
var activeProfileObj = intent['com.symbol.datawedge.api.RESULT_GET_ACTIVE_PROFILE'];
this.activeProfile(activeProfileObj);
}
else if (!intent.hasOwnProperty('RESULT_INFO')) {
// A barcode has been scanned
this.barcodeScanned(intent, new Date().toLocaleString());
}
}

Darryn Campbell
Hi Mario,Couple of things to

Hi Mario,

Couple of things to check:

  • Does my unofficial sample app work for you? https://github.com/darryncampbell/DataWedgeReactNative I have that app working for me on a TC57 running DataWedge 7.3
  • Are you sure the profile you expect to be associated with your app is the active profile when your app is running?  A quick way to check this is to enable Data Capture Plus in the profile, via the DataWedge application on the device.  You would then expect to see the DCP window (like a facebook chat head) when your application comes to the foreground.
Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Mario Faure
Yes, the unofficial sample

Yes, the unofficial sample app does work on the device.
Yes, it's the active profile when the app is running. When I enable Capture Plus in the profile, I see a yellow barcode circle in my app - is this correct?

Still not working. When I debug, it does go into broadcastReceiver(intent) method, but it doesn't hit it a second time like it does when it works on older device; and enters this block:
else if (!intent.hasOwnProperty('RESULT_INFO')) {
// A barcode has been scanned
this.barcodeScanned(intent, new Date().toLocaleString());
}

Never goes into this on the newer device...

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Mario Faure
Got working, changed

Got working, changed filterActions on the DataWedgeIntents.registerBroadcastReceiver to match our app setting

Vote: 
Vote up!
Vote down!

Points: 1

You voted ‘up’


Darryn Campbell
Brilliant! Thanks for follow

Brilliant! Thanks for follow up with the solution

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments