Get Started         Best Practices         Developer Guide         FAQ        

Tutorial: Set up an Android project with CraftAR Image Recognition and Augmented Reality

Last Updated: Aug 04, 2017

Our SDKs are distributed as a .zip file that you have to manually add into your project. Depending on the SDK, you need to follow different steps:



Augmented Reality SDK v4 +

This section applies only to the Augmented Reality SDK v4 +.
1. Import the libraries into the Android Studio project:
  1. Uncompress the craftar-augmented-reality-sdk-android-4.x.zip
  2. Open your project in Android studio. In the project explorer, select the view Project Files.
  3. Create a folder libs in the root of the project. Copy all the .jars included in the libs folder of our SDK there.
  4. Create a folder jniLibs in the src/main folder. Copy the folders armeabi-v7a, arm64-v8a and x86 there.
  5. Copy the assets/ folder in your application src/main/ folder.
  6. If you have import errors with the CraftAR classes, right click on each of the jars in libs/ folder and click on Add as library
2. Edit the manifest

Set the API version to 17 (or higher) for AR-SDK in your manifest, and set the following permissions:

     <uses-permission android:name="android.permission.CAMERA"/>
     <uses-permission android:name="android.permission.CAMERA_EXTENDED"/>
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.hardware.camera.autofocus"/>


On-device Image Recognition SDK

This section applies only to the On Device Image Recognition SDK.
1. Install the SDK
Uncompress the corresponding zip file and copy the libs folder into your project’s root directory.
Using Eclipse
  1. Uncompress the craftar-on-device-image-recognition-sdk.zip
  2. Copy the libs/ folder in your application root directory
  3. Copy the assets/ folder in your application root directory.
Using Android studio
  1. Uncompress the craftar-on-device-image-recognition-sdk-android.zip
  2. Open your project in Android studio. In the project explorer, select the view Project Files.
  3. Create a folder libs in the root of the project. Copy all the .jars included in the libs folder of our SDK there.
  4. Create a folder jniLibs in the src/main folder. Copy the folders armeabi-v7a, arm64-v8a and x86 there.
  5. Copy the assets/ folder in your application src/main/ folder.
  6. If you have import errors with the CraftAR classes, right click on each of the jars in libs/ folder and click on Add as library
2. Edit the manifest
Set the API version to 17 (or higher) in your manifest, and set the following permissions:
     <uses-permission android:name="android.permission.CAMERA"/>
     <uses-permission android:name="android.permission.CAMERA_EXTENDED"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.hardwåare.camera.autofocus"/>
 

CraftAR Pro SDK

This section applies only to the CraftAR Pro SDK.
1. Import the libraries into the Android Studio project:
  1. Uncompress the craftar-pro-sdk-android.zip
  2. Open your project in Android studio. In the project explorer, select the view Project Files.
  3. Create a folder libs in the root of the project. Copy all the .jars included in the libs folder of our SDK there.
  4. Create a folder jniLibs in the src/main folder. Copy the folders armeabi-v7a, arm64-v8a and x86 there.
  5. Copy the assets/ folder in your application src/main/ folder.
  6. If you have import errors with the CraftAR classes, right click on each of the jars in libs/ folder and click on Add as library
2. Edit the manifest

Set the API version to 17 (or higher) for AR-SDK in your manifest, and set the following permissions:

     <uses-permission android:name="android.permission.CAMERA"/>
     <uses-permission android:name="android.permission.CAMERA_EXTENDED"/>
     <uses-permission android:name="android.permission.INTERNET" />
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.hardware.camera.autofocus"/>


Cloud Image Recognition SDK

This section applies to the Cloud Image Recognition SDK .
1. Install the SDK
Uncompress the corresponding zip file and copy the libs folder into your project’s root directory.
2. Edit the manifest
Set the API version to 10 (or higher) for CIR-SDK in your manifest, and set the following permissions:
     <uses-permission android:name="android.permission.CAMERA"/>
     <uses-permission android:name="android.permission.CAMERA_EXTENDED"/>
     <uses-permission android:name="android.permission.INTERNET"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <uses-permission android:name="android.hardware.camera.autofocus"/>

Couldn't find what you were looking for?

support@catchoom.com
https://cdn.desk.com/
false
catchoom
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete