# Print output for @column tags ?>
public
final
class
ScannerIntent
extends Object
| java.lang.Object | |
| ↳ | com.vuzix.sdk.barcode.ScannerIntent |
Defines the constants required for performing barcode scanning via an intent, and defines some classes and methods to simplify the scanning request process.
Basic usage:
startActivityForResult(new ScannerIntent.Request(), YOUR_UNIQUE_ID);
Nested classes | |
|---|---|
class |
ScannerIntent.Request
Creates an Intent used to make a request to the embedded Vuzix engine. |
Constants | |
|---|---|
String |
ACTION
Action used to launch the barcode scanner via an intent. |
String |
EXTRA_BARCODE2_HANDLE_BARCODE
A Boolean extra to specify barcode app should handle the barcode for you. |
String |
EXTRA_BARCODE2_STAY_OPEN_AFTER_HANDLING
A Boolean extra to specify barcode app should expect multiple scans to handle internally. |
String |
EXTRA_BARCODE2_TYPES
A string array extra for specifying barcode types to scan for. |
String |
EXTRA_CAMERA_ID
An integer extra for selecting a specific camera Optional parameter to specify the id of the camera from which to recognize barcodes. |
String |
EXTRA_ENABLE_PREVIEW
A boolean extra for controlling the preview window. |
String |
EXTRA_UI_PROMPT_TEXT
A string extra containing the requested UI text prompt. |
String |
RESULT_EXTRA_SCAN_RESULT2
A parcelable result extra containing the |
public static final String ACTION
Action used to launch the barcode scanner via an intent. If scanning is successful, RESULT_OK will be returned along with an Intent of result extras. Otherwise, RESULT_CANCELLED will be returned.
Constant Value: "com.vuzix.action.SCAN_BARCODE"
public static final String EXTRA_BARCODE2_HANDLE_BARCODE
A Boolean extra to specify barcode app should handle the barcode for you. No data is passed back to the caller. For example:
intent.putExtra(ScannerIntent.EXTRA_BARCODE2_HANDLE_BARCODE, true);
Constant Value: "barcode2_handle_barcode_internally"
public static final String EXTRA_BARCODE2_STAY_OPEN_AFTER_HANDLING
A Boolean extra to specify barcode app should expect multiple scans to handle internally. Must be used with EXTRA_BARCODE2_HANDLE_BARCODE and the app won't close after processing.
intent.putExtra(ScannerIntent.EXTRA_BARCODE2_STAY_OPEN_AFTER_HANDLING, true);
Constant Value: "barcode2_handle_barcode_stay_open"
public static final String EXTRA_BARCODE2_TYPES
A string array extra for specifying barcode types to scan for. Each string should be the name() of a BarcodeType. For example:
intent.putExtra(ScannerIntent.EXTRA_BARCODE2_TYPES, new String[] {BarcodeType2.name()});
Constant Value: "barcode2_types"
public static final String EXTRA_CAMERA_ID
An integer extra for selecting a specific camera Optional parameter to specify the id of the camera from which to recognize barcodes. Overrides the default camera that would otherwise would have been selected. If provided, should be an int.
Constant Value: "SCAN_CAMERA_ID"
public static final String EXTRA_ENABLE_PREVIEW
A boolean extra for controlling the preview window.
Note, this is only read by products with see-through displays implementing SDK engine 1.71 or higher. Other platforms ignore this extra.
The preview will be on while scanning unless this extra is present and set false.
Constant Value: "enable_preview"
public static final String EXTRA_UI_PROMPT_TEXT
A string extra containing the requested UI text prompt.
Constant Value: "prompt"
public static final String RESULT_EXTRA_SCAN_RESULT2
A parcelable result extra containing the ScanResult2 object.
Constant Value: "result2"