public interface IBarcodePickerCallback
Modifier and Type | Field and Description |
---|---|
static int |
STATUS_CANCELLED
The user chose to cancel the barcode scan task and return to the application without a value.
|
static int |
STATUS_ERROR
The barcode scan ended in an error, usually due to an unexpected situation (file-not-found, not enough memory, can't access file).
|
static int |
STATUS_NO_PERMISSION
The application does not have permission to perform this kind of barcode scanning task.
|
Modifier and Type | Method and Description |
---|---|
void |
onBarcode(java.lang.String[] barcodes)
Called when the image has been processed for barcodes, and the results are ready to return.
|
void |
onBarcodeFailed(int result,
java.lang.String error)
Barcode scanning ended as the result of an error or interruption.
|
boolean |
wouldAcceptBarcode(java.lang.String[] barcodes)
Decide if the current set of barcodes found during a live video scan should be accepted or rejected.
|
static final int STATUS_ERROR
static final int STATUS_CANCELLED
static final int STATUS_NO_PERMISSION
void onBarcode(java.lang.String[] barcodes)
barcodes
- An array containing all relevant barcodes that were detected in the image. Note that a zero-length array is possible here.void onBarcodeFailed(int result, java.lang.String error)
the
- status code associated with this callback, ERROR, CANCELLED, or NO_PERMISSONerror
- any further information that may come back from the OS or the ImagePicker
.boolean wouldAcceptBarcode(java.lang.String[] barcodes)
true/false
in the most performant way possible
to indicate if the barcode scanning process should stop. If the barcodes are accepted by returning true
, the values will be
passed to onBarcode()
as the final result and can be processed there.barcodes
- the barcodes to accept