Hi,
I'm using datawedge with intents to receive barcodes. In need to change decoderparameters to runtime on fragment changes. This works perfectly but somehow for no reason the parameters won't change anymore. I'm not able to reproduce this so I don't know why it's acting like this. For my decodeparameter changes I'm doing something like this:
Bundle profileConfig = new Bundle();
profileConfig.putString(PROFILE_NAME, EXTRA_PROFILE_NAME);
profileConfig.putString(PROFILE_ENABLED, "true");
profileConfig.putString(CONFIG_MODE, "UPDATE");
Bundle barcodeConfig = new Bundle();
barcodeConfig.putString(PLUGIN_NAME, BARCODE);
barcodeConfig.putString(RESET_CONFIG, "False");
Bundle barcodeProps = new Bundle();
List<DecoderParam> decoderParams = DecoderParam.getParamListForDecoderConfig(decoderConfig);
for (DecoderParam decoderParam: DecoderParam.values()) {
barcodeProps.putString(decoderParam.getParamName(), decoderParams.contains(decoderParam) ?
"true" : "false");
}
barcodeConfig.putBundle(PARAM_LIST, barcodeProps);
profileConfig.putBundle(PLUGIN_CONFIG, barcodeConfig);
sendDataWedgeIntentWithExtra(context, ACTION_DATAWEDGE, EXTRA_SET_CONFIG, profileConfig);
If I'm deleting my datawedge profile and return to my app it will work again. Am I doing something wrong?
Thanks in advance
2 Replies
Hi,
You can implement result codes to obtain the result of the intent, which may shed some light on your issue: https://techdocs.zebra.com/datawedge/13-0/guide/api/resultinfo/
Also, if you're attempting to change the profile configuration based on which Fragment is in the foreground, you may want to look into creating multiple profiles and switching between them, rather than updating the profile each time.
Thanks,
James
Hi James,
thanks for your reply. I'm already logging the result info but I couldn't figure it out.
I didn't try to switch profiles because the same issue may also occur.