Configuring a new project.
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.
- 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