Following @GustavoBaiocchiCosta
's answer, here is how to disable keystrokes via intent:
public void setKeystrokeConfig(boolean enabled) {
// Keystroke plugin properties bundle
Bundle bParams = new Bundle();
bParams.putString("keystroke_output_enabled", enabled ? "true" : "false"); // <--
bParams.putString("keystroke_action_char", "9");
bParams.putString("keystroke_delay_extended_ascii", "500");
bParams.putString("keystroke_delay_control_chars", "800");
// Keystroke plugin bundle
Bundle bConfig = new Bundle();
bConfig.putString("PLUGIN_NAME", "KEYSTROKE");
bConfig.putBundle("PARAM_LIST", bParams);
// Main bundle properties
Bundle configBundle = new Bundle();
configBundle.putString("PROFILE_NAME", "Profile12");
configBundle.putString("PROFILE_ENABLED", "true");
configBundle.putString("CONFIG_MODE", "CREATE_IF_NOT_EXIST");
configBundle.putBundle("PLUGIN_CONFIG", bConfig);
// Send intent to DataWedge
Intent i = new Intent();
i.setAction("com.symbol.datawedge.api.ACTION");
i.putExtra("com.symbol.datawedge.api.SET_CONFIG", configBundle);
i.putExtra("SEND_RESULT", "true");
i.putExtra("COMMAND_IDENTIFIER", "KEYSTROKE_API");
this.sendBroadcast(i);
}
This prevents a focused input field being populated with the barcode content.
Check out the API here