DocumentDetector v6.x and below
Supported documents
Currently, the supported documents in Android are: RG, CNH, RNE, CRLV, CTPS, Passport. If you have any suggestions for other documents, please contact us!
Privacy Policy and Terms & Conditions of Use
When using our plugin, please make sure that you agree with our Privacy Policy and our Terms and Conditions of Use.
Analytics
Our SDKs by default collect information about the user and running environment to better map fraudsters and understand their behaviors. We recommend keeping this collection active as the sole purpose of this data is for fraud reduction, but if you wish you can disable it by the .setAnalyticsSettings(bool useAnalytics)
parameter.
Pre-requirements
Settings
Android
In the file ROOT_PROJECT/android/app/build.gradle
, add:
iOS
In the ROOT_PROJECT/ios/Podfile
, add to the end of the file:
Finally, add the permissions to the file ROOT_PROJECT/ios/Runner/Info.plist:
To enable text and voice in Portuguese, in your project, in the ROOTPROJECT/ios directory, open the .xcworkspace file in Xcode and add in Project > Info > Localizations the language Portuguese (Brazil).
Flutter
Add the plugin to your ROOT_PROJECT/pubspec.yaml
file:
Runtime Permissions
Utilization
Disabling Security Validations for Testing
We are constantly taking actions to make the product more and more secure, mitigating a number of attacks observed in the capture process and, consequently, reducing as many possible identity frauds as possible. The SDK has some blocks that may prevent its execution in certain contexts. To disable them, you can use the methods as shown in the example below:
Attention! Disabling security validations is recommended for test environments only. For publishing your application in production, we recommend using the default settings.
General customizations
Each environment (beta and production) requires its own specific mobileToken, generated in the Trust platform of the respective environment.
|
Example of use
Example of use
Android
iOS
Collecting the result
The DocumentDetector return object is of abstract type DocumentDetectorResult
. It can be an instance of DocumentDetectorSuccess
, DocumentDetectorFailure
or DocumentDetectorClosed
.
DocumentDetectorSuccess
Capture
DocumentDtetectorFailure
The existing fault types are:
InvalidTokenReason
: when the token entered is invalid. It should not occur in a production environment;PermissionReason
: when some mandatory permission was not granted by the user. It will only occur in a production environment if your app does not ask the user or the user manually disables it before starting;NetworkReason
: server connection failure. It will occur in production if the user's device is not connected to the Internet;ServerReason
: failure in some request to our servers;SecurityReason
: when the device is not safe to run the SDK;StorageReason
: when the device does not have enough space to capture a photo. This can happen in production;LibraryReason
: when some internal failure made it impossible to execute the SDK. It may occur due to project configuration errors, and should not occur in production;
Customizing iOS views
For iOS customization, it is necessary that the Flutter plugins are added locally to the project. The customization is done natively with the ViewCode approach.
****Click here for an example with a guide to using this feature.
Last updated