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:
- 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 with 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.*;
- While 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 "LicenseDetails.java" the same location where the mainActivity is.
- Include two strings. One for the product ID and one for the License Key as follows:
public static final String LICENSE_KEY = "XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX-XXXXXX"; public static final String PRODUCT_ID = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
Run on a real device