License Key


To run the DeepAR Android SDK, you first need to sign up and create your DeepAR account. If you haven't done that by now, you can do it here: DeepAR

After you’ve signed up and logged in to the DeepAR, you can create your new project.

Go to the Projects and click the + icon to create a new project.

Under Applications choose Add android app.

For App name choose any name you want, and for App id set your bundle id.

Read more about Application ID here:

https://developer.android.com/studio/build/application-id


Now just hit Create app, and you will get your license key (app key).

Download the DeepAR Android SDK:

https://developer.deepar.ai/downloads

Copy the App key and paste it inside your DeepAR Android SDK project under "your_license_key_here".

DeepAR Android SDK - Installation

Android platform SDK is distributed as an aar library. Following are the steps to include the library inside your project:

  • Import the deepar.aar file to your application lib folder

  • In Android Studio open Project Structure dialog (File -> Project Structure...)

  • In Project Structure Dialog click "+" button and choose "Import .JAR/.AAR package" option then click Next

  • In the following dialog navigate to deepar.aar file in your libs directory under the "File name" option then click Finish

  • Close all dialogs and Sync the project. Gradle should automatically offer the option since the settings.gradle file has changed and now it should contain the following line:

include ':deepar'
  • Check again Project Structure if the application module has new dependency to deepar. If not add it manually. Under dependency window click "+" -> Module dependency -> deepar -> click ok.

  • Your appliciations gradle.build file should also include new entry in the dependencies section:

implementation project(':deepar')


For a quick start on how to use the library check out the provided ExampleApp implementation.


Usage requirements

Hardware

DeepAR Android SDK supports devices with Android API level 21 and higher. Other minimum hardware requirements are:

  • 2 GB RAM

  • Quad Core 1.3 GHz processor

  • Launch year 2015+

Supported input image resolutions for DeepAR SDK are:

  • 640x360

  • 640x480

  • 1280x720

Devices must be equipped with cameras that support at least one of the mentioned resolution.

Permissions

SDK itself doesn't check for Android permissions but certain ones are required for the library to work correctly. Following are the required permissions:

  • Camera - Manifest.permission.CAMERA 

  • External file storage - Manifest.permission.WRITE_EXTERNAL_STORAGE 

  • Autofocus - android.hardware.camera.autofocus 

  • Record audio -  android.permission.RECORD_AUDIO 

It is the responsibility of user provide required permissions before using the library in the code. Within the ExampleApp code we provide the utility class PermissionActivity which implements permission check and request functionalities.

Camera feed

It is the user's responsibility to provide feed from the camera as input for the library. For this purpose, you can use the functionality of CameraGrabber class that is provided by the library. However, the class has limited functionality and may not fit your use case, therefore the source code for CameraGrabber has been provided in the example project and user can modify it to their needs.

ProGuard

If you're using ProGuard, include this rule:

-keepclassmembers class ai.deepar.ar.DeepAR { *; }

Did this answer your question?