Before setting build.gradle, please download the ARGear SDK library from https://argear.io. You will first need to create an account from the website. The ARGear SDK library (argear.aar) can be found in “Download Free SDK” menu. Once downloaded, place the downloaded ARGear library under the libs directory as shown below.
In order to use ARGear, please note that Android SDK Platform version 6.0 (API level 23) or above should be set. Also, the Application ID must match the Application ID configured in the target ARGear Console project. The build.gradle of your application should be set as shown below.
defaultConfig {// ARGear Console Project Application ID applicationId "com.seerslab.argear.sample"// Android SDK Platform version 6.0 (API level 23) or higher minSdkVersion 23 ndk { abiFilters 'armeabi-v7a','arm64-v8a' }}repositories { flatDir { dirs 'libs' }}dependencies {// To add ARGear libraryimplementation (name:'ARGear-release-0.1.0', ext:'aar')// To add TensorFlow Lite library implementation 'org.tensorflow:tensorflow-lite:1.14.0' implementation 'org.tensorflow:tensorflow-lite-gpu:1.14.0'// To add Retrofit library implementation "com.squareup.retrofit2:retrofit:2.4.0" implementation "com.squareup.retrofit2:converter-gson:2.4.0" implementation "com.squareup.okhttp3:logging-interceptor:3.10.0"// To add gson library implementation "com.google.code.gson:gson:2.8.5"}
2.2 AndroidManifest.xml
The ARGear library requires several permissions for user privacy issues, which includes camera, internet, read and write external storage, and audio. Except audio recording permission, the other permissions are required to be enabled. Depending on your needs, you can selectively allow audio recording permission.
To enable those accessibilities, you should set AndroidManifest.xml as below.
In order to use ARGear, you need to set the API URL and API Key in your application and the package name should be same as Application ID. To do so, first, you need to create a project in ARGear Console (https://console.argear.io). Then, you can check the corresponding API URL and Key from Project Overview > Information.