Class DocumentScan.Builder
-
- All Implemented Interfaces:
public final class DocumentScan.Builder
-
-
Constructor Summary
Constructors Constructor Description DocumentScan.Builder()
-
Method Summary
Modifier and Type Method Description final DocumentScan.BuildersetDocumentType(DocumentType documentType)Set the type of document that the DocumentScan module will look for. final DocumentScan.BuildersetShowTutorials(Boolean showTutorials)Controls whether the V1 capture flow shows the pre-capture tutorial screen. final DocumentScan.BuildersetWaitForTutorials(Boolean waitForTutorials)final DocumentScan.BuildersetShowDocumentProviderOptions(Boolean showDocumentProviderOptions)Controls whether the V1 capture flow offers file/image upload alongside the camera. final DocumentScan.BuildersetAllowSkipDocumentCapture(Boolean allowSkipDocumentCapture)final DocumentScan.BuildersetDocumentSources(Set<DocumentScan.DocumentSource> documentSources)Configure which submission methods the end user can choose from on the Document Capture chooser screen. final DocumentScanbuild()-
-
Method Detail
-
setDocumentType
final DocumentScan.Builder setDocumentType(DocumentType documentType)
Set the type of document that the DocumentScan module will look for.
- Parameters:
documentType- One of the supported document types:- Returns:
- Since:
-
setShowTutorials
@Deprecated(message = "Ignored in V2. Still honored in V1.", level = DeprecationLevel.WARNING) final DocumentScan.Builder setShowTutorials(Boolean showTutorials)
Controls whether the V1 capture flow shows the pre-capture tutorial screen.
V1 only. The V2 flow ignores this flag and always presents its intro/chooser based on setDocumentSources. Deprecated for V2 integrators.
-
setWaitForTutorials
final DocumentScan.Builder setWaitForTutorials(Boolean waitForTutorials)
-
setShowDocumentProviderOptions
@Deprecated(message = "Ignored in V2 - use setDocumentSources instead to configure chooser in V2. Still honored in V1.", replaceWith = @ReplaceWith(imports = {"com.incode.welcome_sdk.modules.DocumentScan"}, expression = "setDocumentSources(setOf(DocumentScan.DocumentSource.CAMERA))"), level = DeprecationLevel.WARNING) final DocumentScan.Builder setShowDocumentProviderOptions(Boolean showDocumentProviderOptions)
Controls whether the V1 capture flow offers file/image upload alongside the camera.
V1 only:
falserestricts V1 to camera capture,true(default) shows the upload options sheet. V2 ignores this flag; integrators on V2 should use setDocumentSources to pick any subset of DocumentSource values instead.
-
setAllowSkipDocumentCapture
final DocumentScan.Builder setAllowSkipDocumentCapture(Boolean allowSkipDocumentCapture)
-
setDocumentSources
final DocumentScan.Builder setDocumentSources(Set<DocumentScan.DocumentSource> documentSources)
Configure which submission methods the end user can choose from on the Document Capture chooser screen. Defaults to all three sources (DocumentSource.CAMERA, DocumentSource.FILE_UPLOAD, DocumentSource.IMAGE_UPLOAD).
Pass any non-empty subset to restrict the choices. A
nullor empty set is coerced back to the default of all three.For document types that don't accept PDFs (e.g. DocumentType.MEDICAL_DOC), DocumentSource.FILE_UPLOAD is automatically dropped at runtime only when another source remains. Configuring exactly
setOf(DocumentSource.FILE_UPLOAD)on such a type is rejected with a ModuleConfigurationException before the flow launches rather than silently falling back, so it does not drop silently in that case.Honored by both V1 and V2. In V1 the set refines the provider options chooser shown via setShowDocumentProviderOptions; when that chooser is disabled, V1 remains camera-only.
-
build
final DocumentScan build()
-
-
-
-