ARGear SDK Documentations
  • Introduction
  • Android
    • 1. Quickstart
    • 2. Configuration Settings
    • 3. ARGear Overview
    • 4. ARGSession
    • 5. Camera
    • 6. Rendering
    • 7. CMS Service
    • 8. Download Contents
    • 9. Set Contents
    • 10. Media
    • 11. Switch Camera Face
    • 12. Enable Debugging Mode
    • 13. ARCore Connect API
    • 14. API Reference
  • iOS
    • 1. Quickstart
    • 2. Configuration Settings
    • 3. ARGear Overview
    • 4. ARGSession
    • 5. Camera
    • 6. Rendering
    • 7. CMS Service
    • 8. Download Contents
    • 9. Set Contents
    • 10. Media
    • 11. Switch Camera Face
    • 12. Enable Debugging Mode
    • 13. ARKit Connect API
    • 14. API Reference
  • Unity
    • 1. Quickstart
    • 2. Configuration Settings
    • 3. ARGear Plugin Overview
    • 4. ARGearManager
    • 5. ARGearCamera
    • 6. CMS Service
    • 7. Download Contents
    • 8. Set Contents
    • 9. Switch Camera Face
    • 10. Enable Debugging Mode
    • 11. API Reference
Powered by GitBook
On this page
  • 2.1 build.gradle
  • 2.2 AndroidManifest.xml
  • 2.3 API URL & Key

Was this helpful?

  1. Android

2. Configuration Settings

Previous1. QuickstartNext3. ARGear Overview

Last updated 5 years ago

Was this helpful?

2.1 build.gradle

Before setting build.gradle, please download the ARGear SDK library from . 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 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"
    
}

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.

<!-- 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"/>

2.3 API URL & Key

Below is 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==";

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 (). Then, you can check the corresponding API URL and Key from Project Overview > Information.

https://console.argear.io
https://argear.io