Closed tafh closed 5 years ago
Hi, did you try specifying the parameters as integers rather than strings? According to http://techdocs.zebra.com/datawedge/7-1/guide/api/setconfig/ they should be ints. Regarding the logcat message, I have never seen that but probably because I have never specifically looked for it... if the profile is still partially working it may be a red herring.
I spent last Friday on solving this problem, I found this problem was sort of a problem of the config in conjunction with cordova-intent-plugin. Also your sample works fine with DataWedge <6.6, I am running 6.9 which requires a slightly changed config. I forked the intent-plugin and created a workaround but I figure you want to do a more proper solution. But at least you are now aware of this problem. I now can successfully set a config like this:
let profileConfig = {
"PROFILE_NAME": "My-App",
"PROFILE_ENABLED": "true",
"CONFIG_MODE": "UPDATE",
"PLUGIN_CONFIG": [{
"PLUGIN_NAME": "BARCODE",
"RESET_CONFIG": "true",
"PARAM_LIST": {
"scanner_selection": "auto",
"scanner_input_enabled": "true",
"remote_scanner_audio_feedback_mode": 0,
"remote_scanner_led_feedback_mode": 0,
}
}, {
"PLUGIN_NAME": "INTENT",
"RESET_CONFIG": "true",
"PARAM_LIST": {
"intent_output_enabled": "true",
"intent_action": "nl.my.app.ACTION",
"intent_delivery": 2
}
}],
"APP_LIST": [{
"PACKAGE_NAME": "nl.my.app",
"ACTIVITY_LIST": ["*"]
}]
};
this.barcodeProvider.sendCommand("com.symbol.datawedge.api.SET_CONFIG", profileConfig);
This is my commit that enables 6.6> style configs: https://github.com/tafh/darryncampbell-cordova-plugin-intent/commit/8b8788e78b2db523e3c8c3f9f8aaf6053e6e6418
I agree there must be a much cleaner way to address this, the issue is how to map the JavaScript [{}] to either an array or arrayList. I have taken your suggested changes and incorporated into 1.1.4 as this is likely to affect others and when I get the opportunity to address this properly I will revisit this. https://github.com/darryncampbell/darryncampbell-cordova-plugin-intent/commit/cd67a2f098b13d589440fe1fd337b041a79db6e1
Thanks, can we close this issue?
Awesome! But be aware this will break the config for <6.6 DataWedge devices. I think that either a notice or even better an if statement will be the best way to go.
Thanks, I'm not too worried about < DW 6.6 since I'm pretty sure you could not specify an array of plugins, you had to specify each plugin individually which is why this sample calls SET_CONFIG twice
I am trying to set the config like this:
But this fails partially, I found this via LogCat:
Here is my system info:
I tried formatting the PLUGIN_CONFIG in all sorts of ways (i.e. like an array), but no success. I can successfully configure on the device via the datawedge app and the profile is created (via the SET_CONFIG) but it is missing the first profile's PARAM_LIST entries. Am I missing something? I