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.
1 Replies
Hi Damian, unfortunately that component was developed a long time ago outside of Zebra coverage.
One thing you could do is to
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.