Android - How to configure a new project

Configuring a new project.

Android minimum requirements:

  • Support with Arm64-v8a CPU instruction set.
  • Support with API level 27 and above.

Include AAR as a new module:

  1. After creating a new project
  2. Go to file->New->New Module
  3. Select "Import .JAR/.AAR Package:


  4. Click on Next
  5. Choose the AAR file (Binah's SDK) - (bnhhrlib.aar)
  6. leave the Subproject as is (bnhhrlib)
  7. Click on Finish:


  8. The Subproject bnhhrlib will be added under your project:


Creating dependencies:

    1. Now we can use all its properties and functions.
    2. Open the build.gradle of your application
    3. Add "implementation project(':bnhhrlib')" under dependencies:


    4. Add under dependencies:
      implementation 'com.babylon.certificatetransparency:certificatetransparency-android:0.2.0'
    5. Open settings.gradle
    6. Verify that "include ':bnhhrlib'" already exists there:


    7. If it does not exist just add it to the file.
    8. Our SDK is ready for implementations.

Configuring c++ and NDK:

In order to allow your Android to work with our C++ native libraries, you have to install NDK that supports C++ 17.

We have to install NDK version 20 and above (Recommend: 20.1.5948944)

to install:

  1. Open Android Studio
  2. Go to Tools->SDK Manager


  3. On the following screen under "Android SDK" section
  4. Choose "SDK Tools" and check the "Show Package Details" check-box


  5. Scroll down to "NDK (Side by side)" section and choose the right NDK version (20.1.5948944)


  6. Click on "OK" to start installing.
  7. And accept the following screen:


  8. NDK installation begins.
  9. You can move this window to the Background by clicking on "Background"


Start implementation:

  1. Open the MainActivity Java file and add import ai.binah.hrv.*;
  2. When you start typing, you will get an auto completion box (which means that SDK was added):


Adding unique Ids for license management:

  1. Create a Java file called "" at the same location where the mainActivity is.
  2. Include one string for the License Key as follows:

Configuring build/deployment configurations (Default APK or APK from app bundle):

  1. Add the following line of code on the file: 
  2. Save the changes that you made on the file
  3. Go to Run/Debug ConfigurationsBUILD1.png
  4. Select app
  5. Change Installation Options-> Deploy from “Default APK” to “APK from app bundle”build2.png
  6. Click OK
  7. Run the Project on a real device to test if the configuration works



  • Run the application on a real device to test as it will not work on an emulator
  • Google prefers publishing with the Android App Bundle on Google Play. To know more about Android App Bundles, please refer to this link.
Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.