Setting the configs in the application.

A Anas Garwal 3 years 6 months ago
20 0 0

Hi there, im trying to activate the datawedge application from my own application. Im able to set the profile and the intet. But when i want to set the decoder data. nothig will change.
Thats my code so far:

Intent i = new Intent();//haupt-bundle einstellungenBundle mainBundle = new Bundle();String profileName = "LISTVIEW-Profile";mainBundle.putString("PROFILE_NAME", profileName);mainBundle.putString("PROFILE_ENABLED", "true");mainBundle.putString("CONFIG_MODE", "CREATE_IF_NOT_EXIST");//Plugin_ConfigBundle configBundle = new Bundle();configBundle.putString("PLUGIN_NAME", "INTENT");//PARAM_LISTBundle paramsBundle = new Bundle();paramsBundle.putString("PARAM_LIST", "PARAM_LIST");paramsBundle.putString("scanner_selection", "auto");paramsBundle.putString("scanner_input_enabled", "true");paramsBundle.putString("intent_output_enabled", "true");paramsBundle.putString("intent_action", "de.hamburg.listview.RECVR");paramsBundle.putInt("intent_delivery", 2);//NEST THE BUNDLE "bParams" WITHIN THE BUNDLE "bConfig"configBundle.putBundle("PARAM_LIST", paramsBundle);configBundle.putString("PLUGIN_NAME", "BARCODE");Bundle extraDataBundle = new Bundle();extraDataBundle.putString("PARAM_LIST", "PARAM_LIST");extraDataBundle.putString("decoder_i2of5", "true");extraDataBundle.putString("decoder_code39", "true");extraDataBundle.putString("decoder_code128", "true");extraDataBundle.putString("decoder_aztec", "false");extraDataBundle.putString("decoder_codabar", "false");extraDataBundle.putString("decoder_datamatrix", "false");extraDataBundle.putString("decoder_ean13", "false");extraDataBundle.putString("decoder_ean8", "false");extraDataBundle.putString("decoder_gs1_databar", "false");extraDataBundle.putString("decoder_gs1_databar_exp", "false");extraDataBundle.putString("decoder_mail_mark", "false");extraDataBundle.putString("decoder_maxicode", "false");extraDataBundle.putString("decoder_pdf417", "false");extraDataBundle.putString("decoder_qrcode", "false");extraDataBundle.putString("decoder_upca", "false");extraDataBundle.putString("decoder_upce0", "false");extraDataBundle.putString("decoder_i2of5_length1", "12");extraDataBundle.putString("decoder_i2of5_length2", "16");//NEST THE BUNDLE "bParams" WITHIN THE BUNDLE "bConfig"configBundle.putBundle("PARAM_LIST", extraDataBundle);//THEN NEST THE "bConfig" BUNDLE WITHIN THE MAIN BUNDLE "bMain"mainBundle.putBundle("PLUGIN_CONFIG", configBundle);// CREATE APP_LIST BUNDLES (apps and/or activities to be associated with the Profile)Bundle appBundle = new Bundle();appBundle.putString("PACKAGE_NAME", "de.hamburg.listview");appBundle.putStringArray("ACTIVITY_LIST", new String[]{"*"});// NEXT APP_LIST BUNDLE(S) INTO THE MAIN BUNDLEmainBundle.putParcelableArray("APP_LIST", new Bundle[]{appBundle});i.setAction("com.symbol.datawedge.api.ACTION");i.putExtra("com.symbol.datawedge.api.SET_CONFIG", mainBundle);this.sendBroadcast(i);

I also have tried to put the decoder data into an extra bundle and nest that into the param bundle.

Does anyone know how to fix this? Or where i can find an example?

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