Document Verification is a powerful solution to enable scanning various types (Utility Bill, Bank statement and many others) of your customer's documents in your mobile application within seconds, also supporting data extraction on documents like Utility Bills and Bank Statements (see Supported documents for data extraction)
For technical changes, please read our transition guide SDK version: 3.5.0
The basic setup is required before continuing with the following setup for DocumentVerification.
Using the SDK requires an activity declaration in your AndroidManifest.xml.
<activity
android:name="com.jumio.dv.DocumentVerificationActivity"
android:theme="@style/Theme.DocumentVerification"
android:hardwareAccelerated="true"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"/>
You can specify your own theme (see Customization chapter). The orientation can be sensor based or locked with the attribute android:screenOrientation
.
Dependency | Mandatory | Description | Size (Jumio libs only) |
---|---|---|---|
com.jumio.android:core:3.5.0@aar | x | Jumio Core library | 4.11 MB |
com.jumio.android:dv:3.5.0@aar | x | Document Verification library | 125.75 KB |
androidx.appcompat:appcompat:1.1.0 | x | Android appcompat library | - |
androidx.room:room-runtime:2.2.3 | x | Android database object mapping library | - |
com.jumio.android:javadoc:3.5.0 | Jumio SDK Javadoc | - |
If an optional module is not linked, the scan method is not available but the library size is reduced.
Applications implementing the SDK shall not run on rooted devices. Use either the below method or a self-devised check to prevent usage of SDK scanning functionality on rooted devices.
DocumentVerificationSDK.isRooted(Context context);
Call the method isSupportedPlatform
to check if the device is supported.
DocumentVerificationSDK.isSupportedPlatform();
Check the Android Studio sample projects to learn the most common use.
To create an instance for the SDK, perform the following call as soon as your activity is initialized.
private static String YOURAPITOKEN = "";
private static String YOURAPISECRET = "";
DocumentVerificationSDK documentVerificationSDK = DocumentVerificationSDK.create(yourActivity, YOURAPITOKEN, YOURAPISECRET, JumioDataCenter.US);
Make sure that your customer API token and API secret are correct, specify an instance
of your activity and provide a reference to identify the scans in your reports (max. 100 characters or null
). If your customer account is in the EU data center, use JumioDataCenter.EU
instead.
Note: Log into your Jumio customer portal, and you can find your customer API token and API secret on the "Settings" page under "API credentials". We strongly recommend you to store credentials outside your app.
Use setType
to pass the document type.
documentVerificationSDK.setType("DOCUMENTTYPE");
Possible types:
- BS (Bank statement)
- IC (Insurance card)
- UB (Utility bill, front side)
- CAAP (Cash advance application)
- CRC (Corporate resolution certificate)
- CCS (Credit card statement)
- LAG (Lease agreement)
- LOAP (Loan application)
- MOAP (Mortgage application)
- TR (Tax return)
- VT (Vehicle title)
- VC (Voided check)
- STUC (Student card)
- HCC (Health care card)
- CB (Council bill)
- SENC (Seniors card)
- MEDC (Medicare card)
- BC (Birth certificate)
- WWCC (Working with children check)
- SS (Superannuation statement)
- TAC (Trade association card)
- SEL (School enrolment letter)
- PB (Phone bill)
- SSC (Social security card)
- CUSTOM (Custom document type)
Use the following method to pass your custom document code. Maintain your custom document code within your Jumio customer portal under "Settings" - "Multi Document" - "Custom".
documentVerificationSDK.setCustomDocumentCode("YOURCUSTOMDOCUMENTCODE");
The country needs to be in format ISO-3166-1 alpha 3 or XKX for Kosovo.
documentVerificationSDK.setCountry("USA");
Use the following property to identify the scan in your reports (max. 100 characters).
documentVerificationSDK.setReportingCriteria("YOURREPORTINGCRITERIA");
A callback URL can be specified for individual transactions constraints see chapter Callback URL). This setting overrides your Jumio customer settings.
documentVerificationSDK.setCallbackUrl("YOURCALLBACKURL");
Data extraction is automatically enabled when it is activated for your account. Use the following setting to disable the extraction on a transaction level:
documentVerificationSDK.setEnableExtraction(false);
Note: If you want to enable extraction for your account in general, please contact your Account Manager, or reach out to Jumio Support.
Use the following property to identify the scan in your reports (max. 100 characters).
documentVerificationSDK.setCustomerInternalReference("YOURSCANREFERENCE");
You can also set a user reference (max. 100 characters).
documentVerificationSDK.setUserReference("USERREFERENCE");
Note: The user reference and customer internal reference must not contain sensitive data like PII (Personally Identifiable Information) or account login.
Use setCameraPosition to configure the default camera (front or back).
documentVerificationSDK.setCameraPosition(JumioCameraPosition.FRONT);
Use setDocumentName to override the document label on Help screen.
documentVerificationSDK.setDocumentName(“YOURDOCNAME”);
The SDK can be customized to fit your application’s look and feel by specifying Theme.DocumentVerification
as a parent style of your own custom theme. Click on the element Theme.DocumentVerification
in the manifest while holding Ctrl and Android Studio will display the available items.
Change the colors of the styles attributes to fit your requirements.
There are 2 possibilities for applying the customized theme that was explained in the previous chapter:
- Customizing theme in AndroidManifest
- Customizing theme at runtime
Apply the your custom theme DocumentVerification with the that you defined before by replacing Theme.DocumentVerification
in the AndroidManifest.xml:
<activity
android:name="com.jumio.dv.DocumentVerificationActivity"
android:theme="@style/CustomDocumentVerificationTheme"
... />
To customize the theme at runtime, overwrite the theme that is used for Netverify in the manifest by adding the line of code below. Use the resource id of a customized theme that uses Theme.Netverify
as parent.
documentVerificationSDK.setCustomTheme(CUSTOMTHEME);
To show the SDK, call the respective method below within your activity or fragment.
Activity: DocumentVerificationSDK.start();
Fragment: startActivityForResult(documentVerificationSDK.getIntent(),DocumentVerificationSDK.REQUEST_CODE);
Note: The default request code is 300. To use another code, override the public static variable DocumentVerificationSDK.REQUEST_CODE
before displaying the SDK.
Implement the standard onActivityResult
method in your activity or fragment for successful scans (Activity.RESULT_OK
) and user cancellation notifications (Activity.RESULT_CANCELED
). Call documentVerificationSDK.destroy()
once you received the result.
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == DocumentVerificationSDK.REQUEST_CODE) {
if (resultCode == Activity.RESULT_OK) {
// OBTAIN PARAMETERS HERE
// YOURCODE
} else if (resultCode == Activity.RESULT_CANCELED) {
String scanReference = data.getStringExtra(DocumentVerificationSDK.EXTRA_SCAN_REFERENCE);
String errorMessage = data.getStringExtra(DocumentVerificationSDK.EXTRA_ERROR_MESSAGE);
String errorCode = data.getStringExtra(DocumentVerificationSDK.EXTRA_ERROR_CODE);
// YOURCODE
}
// CLEANUP THE SDK AFTER RECEIVING THE RESULT
if (documentVerificationSDK != null) {
documentVerificationSDK.destroy();
documentVerificationSDK = null;
}
}
}
Code | Message | Description |
---|---|---|
A[x][yyyy] | We have encountered a network communication problem | Retry possible, user decided to cancel |
B[x][yyyy] | Authentication failed | Secure connection could not be established, retry impossible |
C[x]0401 | Authentication failed | API credentials invalid, retry impossible |
E[x]0000 | No Internet connection available | Retry possible, user decided to cancel |
F00000 | Scanning not available this time, please contact the app vendor | Resources cannot be loaded, retry impossible |
G00000 | Cancelled by end-user | No error occurred |
H00000 | The camera is currently not available | Camera cannot be initialized, retry impossible |
I00000 | Certificate not valid anymore. Please update your application | End-to-end encryption key not valid anymore, retry impossible |
K10400 | Unsupported document code defined. Please contact Jumio support | An unsupported document code has been set, retry impossible |
The first letter (A-K) represents the error case. The remaining characters are represented by numbers that contain information helping us understand the problem situation([x][yyyy]). Please always include the whole code when filing an error related issue to our support team.
To get information about callbacks, Netverify Retrieval API, Netverify Delete API and Global Netverify settings and more, please read our page with server related information.