Star illustrationStar illustrationStar illustration

Hello, what can we help you find?

We're here for you. Whether you need help building authentication into your banking app, need access control or HR verification and onboarding tools you can find all of that here.

Document Capture (Android)

Estimated reading: 5 minutes 38 views

Welcome to AwareID Document Capture for Android

Welcome to the AwareID Document Capture Quick Start Guide for Android! This document will cover how to get started by getting Aware’s demo program working on your devices.

Installer Contents

  • changes.txt – Change log for each release of AwareID Document Capture.
  • LICENSE – Aware license agreement.
  • bin – Directory containing pre-built Face and Document Capture Demo APKs.
  • lib – Directory containing the Android AAR files to use in integration.
  • manuals – Directory containing Face and Document Capture documentation.
  • src-demo – Directory containing Aware demo source code.

Installing the Demo Via Android Studio

To start looking at the AwareID Document Capture SDK Demo, we recommend using Android Studio to compile and run the demo on your Android device. To begin using the demo:

  1. Start Android Studio.
  2. Unzip the aware-docauthawareid-2.0r172145-android-ndk-r20-api21-arm64.tar.gz
  3. In Android Studio select File->Open and navigate to the directory: docauthawareid/src-demo/android/DocAuthAwareIdDemo and select OK.
  4. Select your connected device in Android Studio and press Run.

Please see the manual for getting started with the API and understanding the demo code. Running the app on a device and with the Android emulator are supported.

Configuring the project structure

Configuring the project consists of importing the Face and Document capture SDKs.

Importing the Face Capture SDK to a Project

To include the Face Capture SDK in your application requires three steps:

  1. Update the gradle dependencies and include the AARs in the application lib directory.
    • Add or update the filetree line to include searching for AARs. i.e. api fileTree(dir: ‘libs’, include: [’*.aar’])
    • The dependency section of your application’s gradle may look like the following:

Listing 1 Gradle Dependency

   dependencies {
       api fileTree(dir: 'libs', include: ['*.jar', '*.aar'])

       androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
           exclude group: 'com.android.support', module: 'support-annotations'
       })
       api 'com.squareup.okhttp3:okhttp:3.10.0'
       api 'com.android.support:appcompat-v7:26.1.0'
       api 'com.android.support:design:26.1.0'
       api 'com.android.support.constraint:constraint-layout:1.1.3'
       testImplementation 'junit:junit:4.12'
   }
  1. Copy the Aware-DocAuthAwareId.aar from the lib directory to the libs directory of your application.
  2. Import Face Capture into your application code to start using the DocAuthAwareId classes.

Listing 2 Import Example

   import com.aware.docauthawareid.api.DocAuthAwareIdApi;

Importing the Document Capture SDK to a Project

To include the Document Capture SDK in your application requires three steps:

  1. Update the “root” gradle dependencies.
    • The dependency section of your root’s gradle may look like the following:

Listing 3 Gradle Dependency

   ...
   subprojects {
       apply plugin: 'maven-publish'

       repositories {
           mavenCentral()

           maven {
               url "http://maven.regulaforensics.com/RegulaDocumentReader"
               allowInsecureProtocol = true
           }
       }
   }
  1. Update the “app” gradle dependencies.
    • The dependency section of your application’s gradle may look like the following:

Listing 4 Gradle Dependency

   dependencies {
       ...
       implementation 'com.regula.btdevice:api:1.0+@aar'
       implementation 'com.regula.documentreader.core:fullrfid:6.8.+@aar' // use fullauthrfid core for 7310
       implementation('com.regula.documentreader:api:6.8.+@aar') {
           transitive = true
       }
   }
  1. Update the settings.gradle file.

Listing 5 Gradle Dependency

   import org.gradle.api.initialization.resolve.RepositoriesMode
  1. Make sure the license file is located here “/app/src/main/res/raw/regula.license”

Running the AwareID Document Capture Demo

The AwareID Document Capture installer comes with two demos DocAuthAwareIdDemo and DocAuthAwareIdDemoQR. Each demo will capture a face then document in order to perform a facial match for validation.

DocAuthAwareIdDemo

Launching the DocAuthAwareIdDemo for the first time will bring you to the settings page. You will need to enter the following information obtained from the AwareID admin server before you will be able to enroll:

  • Host URL
  • Customer Name
  • API Key
  • Client Secret

Please see the server documentation for additional details on these fields.

Finish filling out the User Name, Email, and Phone Number fields to complete the settings page. Press the Back button at the top of the settings page to reach the home screen. Accept the prompt requesting permission to access the device’s camera(s). Hit the Enroll button and follow the directions on screen to perform a facial capture. Once a face has been captured, the demo will automatically switch to landscape orientation to perform a document capture. After successfully completing both face and document captures, the demo will return you to the home screen.

Press the Verify button to initiate a facial image capture. After processing, the demo will pop up either “Authentication Success” or “Authentication Failed” based on the verification results.

DocAuthAwareIdDemoQR

Launching the DocAuthAwareIdDemoQR for the first time will immediately prompt you for permission to access the device’s camera(s). After accepting permissions, you will be brought to the home screen. Press the Scan QR Code button to begin enrollment. Scan the QR code generated from the Web App to enroll. Please see the AwareID server documentation for additional details on generating the QR code.

After scanning the QR code successfully, the demo will go to the face capture screen. Follow the directions on screen to capture a facial image. Once a face has been captured, the demo will switch to landscape orientation to perform a document capture. Completing the document capture will end the enrollment process and bring you back to the home screen.

To perform verification, either scan the QR code again or trigger a push notification from the web application. This will initiate a facial image capture. After processing, the demo will pop up either “Authentication Success” or “Authentication Failed” based on the verification results.

CONTENTS