Building the SDK
Creating a Document Detector SDK Instance
To create an instance of DocumentDetector, configure it using the provided methods to suit your application's needs.
Builder Methods
setAndroidSettings(AndroidSettings)
Configures Android-specific settings, including security configurations like root detection.
β
setStage(CafStage)
Defines the environment stage (e.g., PROD, BETA). Default: PROD.
β
setPersonId(String)
Associates a unique person ID or CPF for the document capture flow.
β
setPreviewSettings(PreviewSettings)
Enables or disables the preview screen for document capture. Default: true.
β
setNetworkSettings(int)
Sets the network timeout duration in seconds. Default: 20.
β
setUploadSettings(UploadSettings)
Configures upload-related settings when capturing documents.
β
setDisplayPopup(bool)
Toggles the display of instructional popups before each capture step. Default: true.
β
setCountryCodeList(List)
Restricts accepted passport documents to specific countries.
β
setMessageSettings(MessageSettings)
Customizes the messages displayed during the capture process.
β
setUrlExpirationTime(String)
Configures the expiration time for image URLs on the server (e.g., "30m", "10d"). Default: 30m.
β
setUseAnalytics(bool)
Enables or disables data collection for analytics. Default: false.
β
setIOSSettings(IOSSettings)
Configures iOS-specific settings.
β
setCurrentStepDoneDelayAndroid(bool, int?)
Enables or disables delay between capture steps on Android, and sets the duration (milliseconds).
β
setCurrentStepDoneDelayIOS(int)
Sets the delay duration (in seconds) between capture steps on iOS.
β
Example Implementation (Flutter)
Below is an example of how to integrate and configure the Document Detector SDK in a Flutter application.
Last updated

