Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SET_CONFIG bundle
// MAIN
Bundle bMain = new Bundle();
bMain.putString("PROFILE_NAME", profileName);
bMain.putString("CONFIG_MODE", "CREATE_IF_NOT_EXIST");
bMain.putString("PROFILE_ENABLED", "true");
// PLUGIN_CONFIG of MAIN -- BARCODE
Bundle bBarcodeConfig = new Bundle();
bBarcodeConfig.putString("PLUGIN_NAME", "BARCODE");
bBarcodeConfig.putString("RESET_CONFIG", "true");
// PARAM_LIST of BARCODE
Bundle bBarcodeParams = new Bundle();
bBarcodeParams.putString("scanning_mode", "1");
bBarcodeParams.putString("scanner_selection","auto");
bBarcodeParams.putString("trigger-wakeup", "true");
bBarcodeParams.putString("scanner_input_enabled", "true");
bBarcodeParams.putString("decoder_i2of5", "true");
bBarcodeParams.putString("decoder_code11", "true");
bBarcodeParams.putString("decoder_code93", "true");
bBarcodeConfig.putBundle("PARAM_LIST", bBarcodeParams);
// PLUGIN_CONFIG of MAIN -- INTENT
Bundle bIntentConfig = new Bundle();
bIntentConfig.putString("PLUGIN_NAME", "INTENT");
bIntentConfig.putString("RESET_CONFIG", "true");
// PARAM_LIST of INTENT
Bundle bIntentParams = new Bundle();
bIntentParams.putString("intent_output_enabled", "true");
bIntentParams.putString("intent_action", ACTION);
bIntentParams.putString("intent_category", CATEGORY);
bIntentParams.putString("intent_delivery", "2"); // Broadcast
bIntentConfig.putBundle("PARAM_LIST", bIntentParams);
// PLUGIN_CONFIG of MAIN -- KEYSTROKE
Bundle bIKeyStrokeConfig = new Bundle();
bIKeyStrokeConfig.putString("PLUGIN_NAME", "KEYSTROKE");
bIKeyStrokeConfig.putString("RESET_CONFIG", "true");
// PARAM_LIST of KEYSTROKE
Bundle bKeyStrokeParams = new Bundle();
bKeyStrokeParams.putString("keystroke_output_enabled", "false");
bIKeyStrokeConfig.putBundle("PARAM_LIST", bKeyStrokeParams);
// MAIN
bMain.putParcelableArray("PLUGIN_CONFIG", new Bundle[]{bIKeyStrokeConfig, bBarcodeConfig, bIntentConfig});
// APP_LIST of MAIN
Bundle bundleApp = new Bundle();
bundleApp.putString("PACKAGE_NAME", "com.scancan");
bundleApp.putStringArray("ACTIVITY_LIST", new String[]{"*"});
// MAIN
bMain.putParcelableArray("APP_LIST", new Bundle[]{bundleApp});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.