BarcodeScannerOptions.Builder

public static class BarcodeScannerOptions.Builder extends Object

Builder to build out a BarcodeScannerOptions.

Public Constructor Summary

Public Method Summary

BarcodeScannerOptions
build()
Builds a BarcodeScannerOptions instance.
BarcodeScannerOptions.Builder
setBarcodeFormats(int format, int... moreFormats)
Sets the interested barcode formats defined in Barcode.BarcodeFormat.
BarcodeScannerOptions.Builder
setExecutor(Executor executor)
Sets the custom Executor to use.

Inherited Method Summary

Public Constructors

public BarcodeScannerOptions.Builder ()

Builder for BarcodeScannerOptions.

Public Methods

public BarcodeScannerOptions build ()

Builds a BarcodeScannerOptions instance.

public BarcodeScannerOptions.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.

Only the last call will be respected if calling this method multiple times

Default: all formats are supported.

Parameters
format supported barcode format
moreFormats more supported barcode formats

public BarcodeScannerOptions.Builder setExecutor (Executor executor)

Sets the custom Executor to use. If no Executor is set, an internal background thread pool will be used.

Most clients should not need to call this method.

Parameters
executor the Executor to use
Returns
  • this object, for chaining method calls