public static class GiniVision.Builder
extends java.lang.Object
GiniVision
. To get an instance call GiniVision.newInstance()
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
void |
build()
Create a new
GiniVision instance. |
GiniVision.Builder |
setBackButtonsEnabled(boolean enabled)
Screen API only
|
GiniVision.Builder |
setCustomOnboardingPages(java.util.ArrayList onboardingPages)
Set custom pages to be shown in the Onboarding Screen.
|
GiniVision.Builder |
setDocumentImportEnabledFileTypes(DocumentImportEnabledFileTypes documentImportEnabledFileTypes)
Enable and configure the document import feature or disable it by passing in
DocumentImportEnabledFileTypes.NONE . |
GiniVision.Builder |
setEventTracker(EventTracker eventTracker)
Set the
EventTracker instance which will be called from the different screens to inform you about the various events
which can occur during the usage of the Gini Vision Library. |
GiniVision.Builder |
setFileImportEnabled(boolean fileImportEnabled)
Enable/disable the file import feature.
|
GiniVision.Builder |
setFlashButtonEnabled(boolean enabled)
Enable/disable the flash button in the Camera Screen.
|
GiniVision.Builder |
setFlashOnByDefault(boolean flashOn)
Set whether the camera flash is on or off by default.
|
GiniVision.Builder |
setGiniVisionNetworkApi(GiniVisionNetworkApi giniVisionNetworkApi)
Set the
GiniVisionNetworkApi instance which clients can use to request network
calls (e.g. |
GiniVision.Builder |
setGiniVisionNetworkService(GiniVisionNetworkService giniVisionNetworkService)
Set the
GiniVisionNetworkService instance which will be used by the library to
request document related network calls (e.g. |
GiniVision.Builder |
setMultiPageEnabled(boolean multiPageEnabled)
Enable/disable the multi-page feature.
|
GiniVision.Builder |
setQRCodeScanningEnabled(boolean qrCodeScanningEnabled)
Enable/disable the QRCode scanning feature.
|
GiniVision.Builder |
setShouldShowOnboarding(boolean shouldShowOnboarding)
Screen API only
|
GiniVision.Builder |
setShouldShowOnboardingAtFirstRun(boolean shouldShowOnboardingAtFirstRun)
Screen API only
|
GiniVision.Builder |
setSupportedFormatsHelpScreenEnabled(boolean enabled)
Enable/disable the Supported Formats help screen.
|
public void build()
GiniVision
instance.public GiniVision.Builder setShouldShowOnboardingAtFirstRun(boolean shouldShowOnboardingAtFirstRun)
Set to false
to disable automatically showing the OnboardingActivity the
first time the CameraActivity is launched - we highly recommend letting the Gini Vision
Library show the OnboardingActivity at first run.
Default value is true
.
shouldShowOnboardingAtFirstRun
- whether to show the onboarding on first run or notGiniVision.Builder
instancepublic GiniVision.Builder setCustomOnboardingPages(java.util.ArrayList onboardingPages)
onboardingPages
- an ArrayList
of OnboardingPage
sGiniVision.Builder
instancepublic GiniVision.Builder setShouldShowOnboarding(boolean shouldShowOnboarding)
Set to true
to show the Onboarding Screen every time the CameraActivity
starts.
Default value is false
.
shouldShowOnboarding
- whether to show the onboarding on every launchGiniVision.Builder
instancepublic GiniVision.Builder setMultiPageEnabled(boolean multiPageEnabled)
Disabled by default.
multiPageEnabled
- true
to enable multi-pageGiniVision.Builder
instancepublic GiniVision.Builder setGiniVisionNetworkService(GiniVisionNetworkService giniVisionNetworkService)
GiniVisionNetworkService
instance which will be used by the library to
request document related network calls (e.g. upload, analysis or deletion).giniVisionNetworkService
- a GiniVisionNetworkService
instanceGiniVision.Builder
instancepublic GiniVision.Builder setGiniVisionNetworkApi(GiniVisionNetworkApi giniVisionNetworkApi)
GiniVisionNetworkApi
instance which clients can use to request network
calls (e.g. for sending feedback).giniVisionNetworkApi
- a GiniVisionNetworkApi
instanceGiniVision.Builder
instancepublic GiniVision.Builder setDocumentImportEnabledFileTypes(DocumentImportEnabledFileTypes documentImportEnabledFileTypes)
DocumentImportEnabledFileTypes.NONE
.
Disabled by default.
documentImportEnabledFileTypes
- file types to be enabled for document importGiniVision.Builder
instancepublic GiniVision.Builder setFileImportEnabled(boolean fileImportEnabled)
Disabled by default.
fileImportEnabled
- true
to enable file importGiniVision.Builder
instancepublic GiniVision.Builder setQRCodeScanningEnabled(boolean qrCodeScanningEnabled)
Disabled by default.
qrCodeScanningEnabled
- true
to enable QRCode scanningGiniVision.Builder
instancepublic GiniVision.Builder setSupportedFormatsHelpScreenEnabled(boolean enabled)
Enabled by default.
enabled
- true
to show the Supported Formats help screenGiniVision.Builder
instancepublic GiniVision.Builder setFlashButtonEnabled(boolean enabled)
Disabled by default.
enabled
- true
to show the flash buttonGiniVision.Builder
instancepublic GiniVision.Builder setBackButtonsEnabled(boolean enabled)
Enable/disable back buttons in all Activities except ReviewActivity
and
AnalysisActivity
, which always show back buttons.
Enabled by default.
enabled
- true
to show back buttonsGiniVision.Builder
instancepublic GiniVision.Builder setFlashOnByDefault(boolean flashOn)
If not changed, then flash is on by default.
flashOn
- true
to turn the flash onGiniVision.Builder
instancepublic GiniVision.Builder setEventTracker(EventTracker eventTracker)
EventTracker
instance which will be called from the different screens to inform you about the various events
which can occur during the usage of the Gini Vision Library.eventTracker
- an EventTracker
instanceGiniVision.Builder
instance