Problem with receiving broadcast intent on TC21 and DataWedge 13

// Expert user has replied.
D Damian Dorocicz 1 day 22 hours ago
20 1 0

Hi, 

I maintain application in React Native using barcode scanining in few scenarios. Application is installed on TC21 devices. Some time ago, the company decided to buy some new pieces. Unfortunately, application don't receive broadcast intent on new ones with the same profiles setup (imported from working older device). I also added functionality to add/update dedicated profile programaticaly to avoid any typos during my reaserch. Thats why i guess the problem is DataWedge version but i didn't found any threads solving backward compatibility topic. New devices use DataWedge 13+ but mine is using 8.2.60. 

To implement scan functionality we use this package: react-native-datawedge-intents - npm.

Code:

export const enableZebraScan = () => {
DataWedgeIntents.registerBroadcastReceiver({
filterActions: [
'com.zebra.xyz.internal.ACTION',
'com.symbol.datawedge.api.RESULT_ACTION'
],
filterCategories: [
'android.intent.category.DEFAULT'
]
});
createOrUpdateDataWedgeProfile();
}
const profileConfig = {
PROFILE_NAME: "XYZ",
PROFILE_ENABLED: "true",
CONFIG_MODE: "CREATE_IF_NOT_EXIST",
PLUGIN_CONFIG: {
PLUGIN_NAME: "BARCODE",
RESET_CONFIG: "true",
PARAM_LIST: {
scanner_selection: "auto",
scanner_input_enabled: "true",
decoder_code128: "true",
},
},
APP_LIST: [{PACKAGE_NAME: "com.company.xyz.internal", ACTIVITY_LIST: ["*"]}],
};
const profileKeystrokeConfig = {
PROFILE_NAME: "XYZ",
CONFIG_MODE: "UPDATE",
PROFILE_ENABLED: "true",
PLUGIN_CONFIG: {
PLUGIN_NAME: "KEYSTROKE",
RESET_CONFIG: "true",
PARAM_LIST: {
keystroke_output_enabled: "false",
}
}
}
const profileIntentPluginConfig = {
PROFILE_NAME: "XYZ",
CONFIG_MODE: "UPDATE",
PROFILE_ENABLED: "true",
PLUGIN_CONFIG: {
PLUGIN_NAME: "INTENT",
RESET_CONFIG: "true",
PARAM_LIST: {
intent_output_enabled: "true",
intent_input_enabled: "true",
intent_action: "com.zebra.xyz.internal.ACTION",
intent_delivery: "2",
},
},
};

I would be greateful if someone could provide me some guidance to solve my problem.

Thank you.


 

  

Please Register or Login to post a reply

1 Replies

N Nicola De Zolt

Hi Damian, unfortunately that component was developed a long time ago outside of Zebra coverage. 

One thing you could do is to 

  • export your profile from an older device 
  • on the new device, restore datawegde (it factory-resets DW)
  • import the exported profile into the newer device

Double-check that all the plugins are well-defined. Specifically, check the barcode input plugin and the Intent Output one: the intent action, category, and send method must match those in your code.

Finally, to understand if your app running on newer devices is receiving intents as expected, send that intent manually from adb following the usual schema
adb shell am broadcast -a <action> -d  -t <mime_type> -c <category> -e <extra_key> <extra_value> -n <component>

The two actions above should at least tell you if your problem sits with DW or with your app, so suggesting where investigate farther.

CONTACT
Can’t find what you’re looking for?