GmsBarcodeScannerOptions.Builder
Stay organized with collections
Save and categorize content based on your preferences.
Page Summary
-
GmsBarcodeScannerOptions.Builder is used to build GmsBarcodeScannerOptions instances.
-
The builder provides methods to allow manual barcode input, enable auto-zoom, and set specific barcode formats.
-
Using setBarcodeFormats can improve the barcode scanner's speed by limiting supported formats.
-
The build method finalizes the options configuration.
Builder to build out a GmsBarcodeScannerOptions .
Public Constructor Summary
GmsBarcodeScannerOptions .
Public Method Summary
GmsBarcodeScannerOptions instance.
Barcode.BarcodeFormat .
Inherited Method Summary
Public Constructors
public Builder ()
Builder for GmsBarcodeScannerOptions .
Public Methods
public GmsBarcodeScannerOptions.Builder allowManualInput ()
Allows users to input barcode manually. Disallowed by default.
public GmsBarcodeScannerOptions build ()
Builds a GmsBarcodeScannerOptions
instance.
public GmsBarcodeScannerOptions.Builder enableAutoZoom ()
Allows auto-zoom feature, disabled by default.
public GmsBarcodeScannerOptions.Builder setBarcodeFormats (int format, int... moreFormats)
Sets the interested barcode formats defined in Barcode.BarcodeFormat .
e.g. setBarcodeFormats(Barcode.FORMAT_QR_CODE,
Barcode.FORMAT_UPC_A).
Reducing the number of supported formats will make the barcode scanner faster.
Default: all formats are supported.
Parameters
| format | supported barcode format |
|---|---|
| moreFormats | more supported barcode formats |