rmbl
rmbl

Reputation: 21

Settings Datawedge (Zebra T26) Scanner Profile

we are currently developing a Smartphone app with C# MAUI. Neverless we try to Set the Profile configuration with the DataWedge Configuration on Android. (It's literally the same as in Java.)

What we want to do: We want to set a specific Configuration property in the Scanners profile and activate the Decoder for "Discrete 2of5" or others.

Unfortunately we cannot get it to work with these decoder settings. Other settings are easy to set but this specific decoder settings are a little bit different and are set by EXTRA_DATA Bundle and added to the PARAM_LIST as described in the documentation.

See also: https://techdocs.zebra.com/datawedge/latest/guide/api/setconfig/

We generated the bundle and added the decoder setting as an additional Bundle to the PARAM_LIST of the PLUGIN.

 var barcodeConfig = new Bundle();
 barcodeConfig.PutString("PLUGIN_NAME", "BARCODE");
 barcodeConfig.PutString("RESET_CONFIG", "true"); 

 var barcodeProps = new Bundle();
 barcodeProps.PutString("configure_all_scanners", "true"); 

 var decoderBundle = new Bundle();
 decoderBundle.PutString("decoder_d2of5", "true");
 barcodeProps.PutBundle("EXTRA_DATA", decoderBundle);

 barcodeConfig.PutBundle("PARAM_LIST", barcodeProps);
 profileConfig.PutBundle("PLUGIN_CONFIG", barcodeConfig);

 SendDataWedgeIntentWithExtraAsBundle(ACTION_DATAWEDGE_FROM_6_2, EXTRA_SET_CONFIG, profileConfig);

For completeness here is the code for of the SendDataWedgeIntentWithExtraAsBundle method:

 private static  void SendDataWedgeIntentWithExtraAsBundle(string action, string extraKey, Bundle extras)
 {
     var dwIntent = new Intent();
     dwIntent.SetAction(action);
     dwIntent.PutExtra(extraKey, extras);
     Android.App.Application.Context.SendBroadcast(dwIntent);
 }

As seen in the code we generate the Bundle for the BARCODE and set the configure_all_scanners to "true".

After this we create a new Bundle with the Decoder Setting and Add this to the PARAM_LIST Bundle as "EXTRA_DATA".

I think we did everything how it is described in the documentation but somehow these "subsettings" are not set.

subsettings

I think we have a small problem we can't figure out. All "normal" properties are working fine we are only struggling with the decoders.

Maybe someone can help?

Upvotes: 2

Views: 342

Answers (1)

Aravinth
Aravinth

Reputation: 11

There’s no need for the decoder bundle. In barcodeProps, add the decoder_i2of5 to enable:

barcodeProps.PutString("decoder_i2of5", "true"); // enable Interleved 2of5 type

Upvotes: 1

Related Questions