Builder for GmsDocumentScannerOptions
.
Public Constructor Summary
Builder()
Builder for
GmsDocumentScannerOptions .
|
Public Method Summary
GmsDocumentScannerOptions |
build()
Builds a
GmsDocumentScannerOptions instance.
|
GmsDocumentScannerOptions.Builder |
setGalleryImportAllowed(boolean galleryImportAllowed)
Sets whether to show a UI button to allow the user to import images from photo
gallery.
|
GmsDocumentScannerOptions.Builder |
setPageLimit(int pageLimit)
Sets a page limit for the maximum number of pages that can be scanned in a
single scanning session.
|
GmsDocumentScannerOptions.Builder |
setResultFormats(int format, int... moreFormats)
Sets scanner
GmsDocumentScannerOptions.ResultFormat s.
|
GmsDocumentScannerOptions.Builder |
setScannerMode(int scannerMode)
Sets the scanner mode which determines what features are enabled.
|
Inherited Method Summary
Public Constructors
public Builder ()
Builder for
GmsDocumentScannerOptions
.
Public Methods
public GmsDocumentScannerOptions build ()
Builds a
GmsDocumentScannerOptions
instance.
public GmsDocumentScannerOptions.Builder setGalleryImportAllowed (boolean galleryImportAllowed)
Sets whether to show a UI button to allow the user to import images from photo gallery.
The default value is true
.
public GmsDocumentScannerOptions.Builder setPageLimit (int pageLimit)
Sets a page limit for the maximum number of pages that can be scanned in a single scanning session.
The provided value should be be greater than or equal to 1.
If no page limit is set, the restriction on the number of pages that can be scanned is determined by hardware resources, e.g. memory, disk storage.
public GmsDocumentScannerOptions.Builder setResultFormats (int format, int... moreFormats)
Sets scanner
GmsDocumentScannerOptions.ResultFormat
s.
Available formats:
GmsDocumentScannerOptions.RESULT_FORMAT_JPEG
,
GmsDocumentScannerOptions.RESULT_FORMAT_PDF
.
The default value is
GmsDocumentScannerOptions.RESULT_FORMAT_JPEG
.
public GmsDocumentScannerOptions.Builder setScannerMode (int scannerMode)
Sets the scanner mode which determines what features are enabled.
Available modes:
GmsDocumentScannerOptions.SCANNER_MODE_FULL
,
GmsDocumentScannerOptions.SCANNER_MODE_BASE_WITH_FILTER
,
GmsDocumentScannerOptions.SCANNER_MODE_BASE
.
The default value is
GmsDocumentScannerOptions.SCANNER_MODE_FULL
.