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:
- After creating a new project
- Go to file->New->New Module
- Select "Import .JAR/.AAR Package:
- Click on Next
- Choose the AAR file (Binah's SDK) - (bnhhrlib.aar)
- leave the Subproject as is (bnhhrlib)
- Click on Finish:
- The Subproject bnhhrlib will be added under your project:
- Now we can use all its properties and functions.
- Open the build.gradle of your application
- Add "implementation project(':bnhhrlib')" under dependencies:
- Add under dependencies:
- Open settings.gradle
- Verify that "include ':bnhhrlib'" already exists there:
- If it does not exist just add it to the file.
- 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)
- Open Android Studio
- Go to Tools->SDK Manager
- On the following screen under "Android SDK" section
- Choose "SDK Tools" and check the "Show Package Details" check-box
- Scroll down to "NDK (Side by side)" section and choose the right NDK version (20.1.5948944)
- Click on "OK" to start installing.
- And accept the following screen:
- NDK installation begins.
- You can move this window to the Background by clicking on "Background"
- Open the MainActivity Java file and add import ai.binah.hrv.*;
- When you start typing, you will get an auto completion box (which means that SDK was added):
Adding unique Ids for license management:
- Create a Java file called "LicenseDetails.java" at the same location where the mainActivity is.
- Include one string for the License Key as follows:
public static final String LICENSE_KEY = "XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX";
Configuring build/deployment configurations (Default APK or APK from app bundle):
- Add the following line of code on the gradle.properties file:
- Save the changes that you made on the file
- Go to Run/Debug Configurations
- Select app
- Change Installation Options-> Deploy from “Default APK” to “APK from app bundle”
- Click OK
- 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.