Modifier and Type | Field and Description |
---|---|
static String |
ACTION
Send this intent to open the Barcodes app in scanning mode, find a barcode, and return
the results.
|
static String |
CHARACTER_SET |
static String |
DATA_MATRIX_MODE
Decode only Data Matrix codes.
|
static String |
FORMATS
Comma-separated list of formats to scan for.
|
static String |
HEIGHT |
static String |
MODE
By default, sending this will decode all barcodes that we understand.
|
static String |
ONE_D_MODE
Decode only 1D barcodes.
|
static String |
PRODUCT_MODE
Decode only UPC and EAN barcodes.
|
static String |
PROMPT_MESSAGE
Prompt to show on-screen when scanning by intent.
|
static String |
QR_CODE_MODE
Decode only QR codes.
|
static String |
RESULT
If a barcode is found, Barcodes returns
Activity.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 String |
RESULT_BYTE_SEGMENTS_PREFIX
Prefix for keys that map to the values of
com.google.zxing.ResultMetadataType#BYTE_SEGMENTS ,
if available. |
static String |
RESULT_BYTES
Call
Intent.getByteArrayExtra(String) with RESULT_BYTES
to get a byte[] of raw bytes in the barcode, if available. |
static String |
RESULT_DISPLAY_DURATION_MS
Desired duration in milliseconds for which to pause after a successful scan before
returning to the calling intent.
|
static String |
RESULT_ERROR_CORRECTION_LEVEL
Key for the value of
com.google.zxing.ResultMetadataType#ERROR_CORRECTION_LEVEL , if available. |
static String |
RESULT_FORMAT
Call
Intent.getStringExtra(String) with RESULT_FORMAT
to determine which barcode format was found. |
static String |
RESULT_ORIENTATION
Key for the value of
com.google.zxing.ResultMetadataType#ORIENTATION , if available. |
static String |
RESULT_UPC_EAN_EXTENSION
Call
Intent.getStringExtra(String) with RESULT_UPC_EAN_EXTENSION
to return the content of any UPC extension barcode that was also found. |
static String |
SAVE_HISTORY
Setting this to false will not save scanned codes in the history.
|
static String |
WIDTH
Optional parameters to specify the width and height of the scanning rectangle in pixels.
|
public static final String ACTION
public static final String MODE
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.public static final String PRODUCT_MODE
public static final String ONE_D_MODE
public static final String QR_CODE_MODE
public static final String DATA_MATRIX_MODE
public static final String FORMATS
com.google.zxing.BarcodeFormat
s, e.g. com.google.zxing.BarcodeFormat#EAN_13
.
Example: "EAN_13,EAN_8,QR_CODE". This overrides MODE
.public static final String CHARACTER_SET
com.google.zxing.DecodeHintType#CHARACTER_SET
,
Constant Field Valuespublic static final String WIDTH
public static final String HEIGHT
public static final String RESULT_DISPLAY_DURATION_MS
public static final String PROMPT_MESSAGE
String
.public static final String RESULT
Activity.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 Activity.RESULT_CANCELED
.public static final String RESULT_FORMAT
Intent.getStringExtra(String)
with RESULT_FORMAT
to determine which barcode format was found.
See com.google.zxing.BarcodeFormat
for possible values.public static final String RESULT_UPC_EAN_EXTENSION
Intent.getStringExtra(String)
with RESULT_UPC_EAN_EXTENSION
to return the content of any UPC extension barcode that was also found. Only applicable
to com.google.zxing.BarcodeFormat#UPC_A
and com.google.zxing.BarcodeFormat#EAN_13
formats.public static final String RESULT_BYTES
Intent.getByteArrayExtra(String)
with RESULT_BYTES
to get a byte[]
of raw bytes in the barcode, if available.public static final String RESULT_ORIENTATION
com.google.zxing.ResultMetadataType#ORIENTATION
, if available.
Call Intent.getIntArrayExtra(String)
with RESULT_ORIENTATION
.public static final String RESULT_ERROR_CORRECTION_LEVEL
com.google.zxing.ResultMetadataType#ERROR_CORRECTION_LEVEL
, if available.
Call Intent.getStringExtra(String)
with RESULT_ERROR_CORRECTION_LEVEL
.public static final String RESULT_BYTE_SEGMENTS_PREFIX
com.google.zxing.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.
Call Intent.getByteArrayExtra(String)
with these keys.public static final String SAVE_HISTORY
boolean
.