com.google.zxing.client.android
Class Intents.Scan

java.lang.Object
  extended by com.google.zxing.client.android.Intents.Scan
Enclosing class:
Intents

public static final class Intents.Scan
extends java.lang.Object


Field Summary
static java.lang.String ACTION
          Send this intent to open the Barcodes app in scanning mode, find a barcode, and return the results.
static java.lang.String CHARACTER_SET
           
static java.lang.String DATA_MATRIX_MODE
          Decode only Data Matrix codes.
static java.lang.String FORMATS
          Comma-separated list of formats to scan for.
static java.lang.String HEIGHT
           
static java.lang.String MODE
          By default, sending this will decode all barcodes that we understand.
static java.lang.String ONE_D_MODE
          Decode only 1D barcodes.
static java.lang.String PRODUCT_MODE
          Decode only UPC and EAN barcodes.
static java.lang.String PROMPT_MESSAGE
          Prompt to show on-screen when scanning by intent.
static java.lang.String QR_CODE_MODE
          Decode only QR codes.
static java.lang.String RESULT
          If a barcode is found, Barcodes returns RESULT_OK to Activity.onActivityResult(int, int, android.content.Intent) of the app which requested the scan via Activity.startActivityForResult(android.content.Intent, int) The barcodes contents can be retrieved with Intent.getStringExtra(String).
static java.lang.String RESULT_BYTE_SEGMENTS_PREFIX
          Prefix for keys that map to the values of ResultMetadataType.BYTE_SEGMENTS, if available.
static java.lang.String RESULT_BYTES
          Call intent.getByteArrayExtra(RESULT_BYTES) to get a byte[] of raw bytes in the barcode, if available.
static java.lang.String RESULT_DISPLAY_DURATION_MS
          Desired duration in milliseconds for which to pause after a successful scan before returning to the calling intent.
static java.lang.String RESULT_ERROR_CORRECTION_LEVEL
          Key for the value of ResultMetadataType.ERROR_CORRECTION_LEVEL, if available.
static java.lang.String RESULT_FORMAT
          Call intent.getStringExtra(RESULT_FORMAT) to determine which barcode format was found.
static java.lang.String RESULT_ORIENTATION
          Key for the value of ResultMetadataType.ORIENTATION, if available.
static java.lang.String SAVE_HISTORY
          Setting this to false will not save scanned codes in the history.
static java.lang.String WIDTH
          Optional parameters to specify the width and height of the scanning rectangle in pixels.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTION

public static final java.lang.String ACTION
Send this intent to open the Barcodes app in scanning mode, find a barcode, and return the results.

See Also:
Constant Field Values

MODE

public static final java.lang.String MODE
By default, sending this will decode all barcodes that we understand. However it may be useful to limit scanning to certain formats. Use Intent.putExtra(String, String) with one of the values below. Setting this is effectively shorthand for setting explicit formats with FORMATS. It is overridden by that setting.

See Also:
Constant Field Values

PRODUCT_MODE

public static final java.lang.String PRODUCT_MODE
Decode only UPC and EAN barcodes. This is the right choice for shopping apps which get prices, reviews, etc. for products.

See Also:
Constant Field Values

ONE_D_MODE

public static final java.lang.String ONE_D_MODE
Decode only 1D barcodes.

See Also:
Constant Field Values

QR_CODE_MODE

public static final java.lang.String QR_CODE_MODE
Decode only QR codes.

See Also:
Constant Field Values

DATA_MATRIX_MODE

public static final java.lang.String DATA_MATRIX_MODE
Decode only Data Matrix codes.

See Also:
Constant Field Values

FORMATS

public static final java.lang.String FORMATS
Comma-separated list of formats to scan for. The values must match the names of BarcodeFormats, e.g. BarcodeFormat.EAN_13. Example: "EAN_13,EAN_8,QR_CODE" This overrides MODE.

See Also:
Constant Field Values

CHARACTER_SET

public static final java.lang.String CHARACTER_SET
See Also:
DecodeHintType.CHARACTER_SET, Constant Field Values

WIDTH

public static final java.lang.String WIDTH
Optional parameters to specify the width and height of the scanning rectangle in pixels. The app will try to honor these, but will clamp them to the size of the preview frame. You should specify both or neither, and pass the size as an int.

See Also:
Constant Field Values

HEIGHT

public static final java.lang.String HEIGHT
See Also:
Constant Field Values

RESULT_DISPLAY_DURATION_MS

public static final java.lang.String RESULT_DISPLAY_DURATION_MS
Desired duration in milliseconds for which to pause after a successful scan before returning to the calling intent. Specified as a long, not an integer! For example: 1000L, not 1000.

See Also:
Constant Field Values

PROMPT_MESSAGE

public static final java.lang.String PROMPT_MESSAGE
Prompt to show on-screen when scanning by intent. Specified as a String.

See Also:
Constant Field Values

RESULT

public static final java.lang.String RESULT
If a barcode is found, Barcodes returns RESULT_OK to Activity.onActivityResult(int, int, android.content.Intent) of the app which requested the scan via Activity.startActivityForResult(android.content.Intent, int) The barcodes contents can be retrieved with Intent.getStringExtra(String). If the user presses Back, the result code will be RESULT_CANCELED.

See Also:
Constant Field Values

RESULT_FORMAT

public static final java.lang.String RESULT_FORMAT
Call intent.getStringExtra(RESULT_FORMAT) to determine which barcode format was found. See Contents.Format for possible values.

See Also:
Constant Field Values

RESULT_BYTES

public static final java.lang.String RESULT_BYTES
Call intent.getByteArrayExtra(RESULT_BYTES) to get a byte[] of raw bytes in the barcode, if available.

See Also:
Constant Field Values

RESULT_ORIENTATION

public static final java.lang.String RESULT_ORIENTATION
Key for the value of ResultMetadataType.ORIENTATION, if available. Call intent.getIntExtra(RESULT_ORIENTATION).

See Also:
Constant Field Values

RESULT_ERROR_CORRECTION_LEVEL

public static final java.lang.String RESULT_ERROR_CORRECTION_LEVEL
Key for the value of ResultMetadataType.ERROR_CORRECTION_LEVEL, if available. Call intent.getStringExtra(RESULT_ERROR_CORRECTION_LEVEL).

See Also:
Constant Field Values

RESULT_BYTE_SEGMENTS_PREFIX

public static final java.lang.String RESULT_BYTE_SEGMENTS_PREFIX
Prefix for keys that map to the values of ResultMetadataType.BYTE_SEGMENTS, if available. The actual values will be set under a series of keys formed by adding 0, 1, 2, ... to this prefix. So the first byte segment is under key "SCAN_RESULT_BYTE_SEGMENTS_0" for example.

See Also:
Constant Field Values

SAVE_HISTORY

public static final java.lang.String SAVE_HISTORY
Setting this to false will not save scanned codes in the history.

See Also:
Constant Field Values