# Print output for @column tags ?> ScannerIntent | Android Developers

Most visited

Recently visited

ScannerIntent

public final class ScannerIntent
extends Object

java.lang.Object
   ↳ com.vuzix.sdk.barcode.ScannerIntent


ScannerIntent contains constants useful for performing barcode scanning via an intent.

Summary

Constants

String ACTION

Action used to launch the barcode scanner via an intent.

String EXTRA_BARCODE2_TYPES

A string array extra for specifying barcode types to scan for.

String EXTRA_BARCODE_TYPES

This constant is deprecated. As of Scanner 2

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_LICENSE_KEY

This constant is deprecated. As of Scanner 2

String EXTRA_SCANNING_RECT

This constant is deprecated. As of Scanner 2

String RESULT_EXTRA_BARCODE_TEXT

A string result extra containing the contents of the barcode.

String RESULT_EXTRA_BARCODE_TYPE

This constant is deprecated. As of Scanner 2

String RESULT_EXTRA_BARCODE_TYPE2

A string result extra containing the type of barcode scanned.

String RESULT_EXTRA_SCAN_RESULT

This constant is deprecated. As of Scanner 2

String RESULT_EXTRA_SCAN_RESULT2

A parcelable result extra containing the ScanResult2 object.

String RESULT_RECEIVER

Optional Your class derived from ResultReceiver,Passed in on the intent, Will receive the result of the scan in addition to the result being passed back as result.

Constants

ACTION

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"

EXTRA_BARCODE2_TYPES

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_BARCODE_TYPES, new String[] {BarcodeType2.name()});

Constant Value: "barcode2_types"

EXTRA_BARCODE_TYPES

public static final String EXTRA_BARCODE_TYPES

This constant is deprecated.
As of Scanner 2

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_BARCODE_TYPES, new String[] {BarcodeType.QR.name(), BarcodeType.QR_MICRO.name()});

Constant Value: "barcode_types"

EXTRA_CAMERA_ID

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"

EXTRA_ENABLE_PREVIEW

public static final String EXTRA_ENABLE_PREVIEW

A boolean extra for controlling the preview window. Note, thisis 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"

EXTRA_LICENSE_KEY

public static final String EXTRA_LICENSE_KEY

This constant is deprecated.
As of Scanner 2

A string extra for specifying a custom license key. Only valid on M300 and M300XL.

Constant Value: "license_key"

EXTRA_SCANNING_RECT

public static final String EXTRA_SCANNING_RECT

This constant is deprecated.
As of Scanner 2

A parcelable extra for specifying the scanning rect. For example:

intent.putExtra(ScannerIntent.EXTRA_SCANNING_RECT, new ScanningRect(.5f, .5f));

Constant Value: "scanning_rect"

RESULT_EXTRA_BARCODE_TEXT

public static final String RESULT_EXTRA_BARCODE_TEXT

A string result extra containing the contents of the barcode.

Constant Value: "text"

RESULT_EXTRA_BARCODE_TYPE

public static final String RESULT_EXTRA_BARCODE_TYPE

This constant is deprecated.
As of Scanner 2

A string result extra containing the type of barcode scanned.

Constant Value: "type"

RESULT_EXTRA_BARCODE_TYPE2

public static final String RESULT_EXTRA_BARCODE_TYPE2

A string result extra containing the type of barcode scanned.

Constant Value: "type2"

RESULT_EXTRA_SCAN_RESULT

public static final String RESULT_EXTRA_SCAN_RESULT

This constant is deprecated.
As of Scanner 2

A parcelable result extra containing the ScanResult object.

Constant Value: "result"

RESULT_EXTRA_SCAN_RESULT2

public static final String RESULT_EXTRA_SCAN_RESULT2

A parcelable result extra containing the ScanResult2 object.

Constant Value: "result2"

RESULT_RECEIVER

public static final String RESULT_RECEIVER

Optional Your class derived from ResultReceiver,Passed in on the intent, Will receive the result of the scan in addition to the result being passed back as result. This is useful when not being called from an activity.

Constant Value: "result_receiver"