Configuration Settings

build.gradle

Before setting build.gradle, please download ARGear SDK library from https://argear.io. You will first need to create an account from the website. ARGear SDK library (ARGear-release-x.x.x.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. build.gradle of your application should be set as below.

defaultConfig {
// 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 library
implementation (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"
}

AndroidManifest.xml

ARGear library requires several permissions for user privacy issues, which includes camera, internet, read and write external storage, and audio. Except audio recording permission, other permissions are required to be set. Depending on your needs, you can selectively allow audio recording permission.

To enable those accessibilities, you should set AndroidManifest.xml as below.

<!-- Required Access -->
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Selective Access -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-feature
android:glEsVersion="0x00030001"
android:required="true" />
<uses-feature
android:name="android.hardware.camera"
android:required="true"/>

API URL & Key

In order to use ARGear, you need to set API URL and API Key in your application. 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.

Below is a sample code of an ARGear Sample App.

<Example Configuration Settings of a Sample App>
public static final String API_URL = "https://apis.argear.io";
public static final String API_KEY = "fe49fe8fe8c757e5a4f8d48d";
public static final String SECRET_KEY = "5c3b1c9540b4d76134596fd3e9acb2a1aef55245a9980fdd26064ea6b8c5c48c";
public static final String AUTH_KEY = "U2FsdGVkX1/GtbZ6o6rv2Yu5d3iUvs1iAogzDf47WC1RBZmHQyociXlqrV/DXJ4+yrogIDSI90mEbwcQ8Q0DNw==";
<Fig. Sample App ARGear Console Information>