Summary: Ctors | Methods | Inherited Methods | [Expand All]
public static class

# BarcodeDetector.Builder

extends Object

java.lang.Object
↳ | com.google.android.gms.vision.barcode.BarcodeDetector.Builder

## Class Overview

Barcode detector builder.

## Summary

Public Constructors
| BarcodeDetector.Builder(Context context)

Public Methods
BarcodeDetector | build() Builds a barcode detector instance using the provided settings.
BarcodeDetector.Builder | setBarcodeFormats(int format) Bit mask (containing values like `QR_CODE` and so on) that selects which formats this barcode detector should recognize.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## Public Constructors

#### public BarcodeDetector.Builder (Context context)

## Public Methods

#### public BarcodeDetector build ()

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()`.

##### Returns

- new `BarcodeDetector` instance

#### public BarcodeDetector.Builder setBarcodeFormats (int format)

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`

By default, the detector will recognize all supported formats. This corresponds to the special `ALL_FORMATS` constant.