Soft Trigger

DataWedge 13.0

SOFT_TRIGGER

Used to start, stop or toggle a software trigger for voice input.

Functional only when Voice Input is enabled in the active Profile.

Function Prototype

Intent i = new Intent();
i.setPackage("com.symbol.datawedge");
i.setAction("com.symbol.datawedge.api.ACTION");
i.putExtra("SEND_RESULT","LAST_RESULT");
i.putExtra("PLUGIN_NAME", "<PLUGIN NAME>");
i.putExtra("com.symbol.datawedge.api.SOFT_TRIGGER","<start or stop>");); //START, STOP, TOGGLE
i.putExtra("COMMAND_IDENTIFIER", "<Command identifier>");
mContext.sendBroadcast(i);

Parameters

ACTION [String]: "com.symbol.datawedge.api.ACTION"

EXTRA_DATA [String]: "com.symbol.datawedge.api.SOFT_TRIGGER"

<parameter>: The parameter as a string, using any of the following:

  • START - starts capturing when triggered
  • STOP - stops or interrupts capturing when triggered

Result Codes

DataWedge returns the following error codes if the app includes the intent extras SEND_RESULT and COMMAND_IDENTIFIER to enable the app to get results using the DataWedge result intent mechanism. See Example, below.

  • DATAWEDGE_DISABLED - FAILURE
  • INPUT_NOT_ENABLED - FAILURE
  • PARAMETER_INVALID - FAILURE
  • PROFILE_DISABLED - FAILURE
  • OPERATION_NOT_ALLOWED - FAILURE

Also see the Result Codes guide for more information.

Example Code

Intent i = new Intent();
i.setPackage("com.symbol.datawedge");
i.setAction("com.symbol.datawedge.api.ACTION");
i.putExtra("SEND_RESULT","LAST_RESULT");
i.putExtra("PLUGIN_NAME", "VOICE");
i.putExtra("com.symbol.datawedge.api.SOFT_TRIGGER", "START"); //START, STOP
i.putExtra("COMMAND_IDENTIFIER", "VOICE_TRIGGER");
sendBroadcast(i);

SEE ALSO:

Zebra Support Central | Integrator Guides, Product Manuals, Software Downloads and Support

LaunchPad | Zebra Developer Community

Intent | Android Developers

Intents and Intent Filters | Android Developers

Android Intents | Tutorial