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-FaceCapture.aar from the lib directory to the libs directory of your application.

  2. Import Face Capture into your application code to start using the FaceCapture classes.

Listing 2 Import Example
   import com.aware.facecapture.api.FaceCaptureApi;