java.lang.Object | |
↳ | com.google.android.gms.vision.barcode.BarcodeDetector.Builder |
Barcode detector builder.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Builds a barcode detector instance using the provided settings.
| |||||||||||
Bit mask (containing values like
QR_CODE and so on) that selects which
formats this barcode detector should recognize. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Parameters | |
---|---|
context |
Context
|
Builds a barcode detector instance using the provided settings. If the underlying native
implementation is unavailable (e.g. hasn't been downloaded yet), the detector will always
return an empty result set. In this case, it will report that it is non-operational via
isOperational()
.
Note that this method may cause blocking disk reads and should not be called on an
application's main thread. To avoid blocking the main thread, consider moving Detector
construction to a background thread using AsyncTask
. Enable
StrictMode
to automatically detect blocking operations on the main
thread.
Returns | |
---|---|
BarcodeDetector |
new BarcodeDetector instance
|
Bit mask (containing values like QR_CODE
and so on) that selects which
formats this barcode detector should recognize.
The full list of supported format constants is:
ALL_FORMATS
AZTEC
CODE_128
CODE_39
CODE_93
CODABAR
DATA_MATRIX
EAN_13
EAN_8
ITF
PDF417
QR_CODE
UPC_A
UPC_E
ALL_FORMATS
constant.
Parameters | |
---|---|
format |
int
|
Returns | |
---|---|
BarcodeDetector.Builder |