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:
- Android Augmented Reality SDK v4 +
- On-device Image Recognition SDK
- Android Cloud Image Recognition SDK
- Android CraftAR Pro SDK
Augmented Reality SDK v4 +
This section applies only to the Augmented Reality SDK v4 +.
1. Import the libraries into the Android Studio project:
- Uncompress the craftar-augmented-reality-sdk-android-4.x.zip
- Open your project in Android studio. In the project explorer, select the view Project Files.
- Create a folder libs in the root of the project. Copy all the .jars included in the libs folder of our SDK there.
- Create a folder jniLibs in the src/main folder. Copy the folders armeabi-v7a, arm64-v8a and x86 there.
- Copy the assets/ folder in your application src/main/ folder.
- 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:
1
2
3
4
5
|
<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
- Uncompress the craftar-on-device-image-recognition-sdk.zip
- Copy the libs/ folder in your application root directory
- Copy the assets/ folder in your application root directory.
Using Android studio
- Uncompress the craftar-on-device-image-recognition-sdk-android.zip
- Open your project in Android studio. In the project explorer, select the view Project Files.
- Create a folder libs in the root of the project. Copy all the .jars included in the libs folder of our SDK there.
- Create a folder jniLibs in the src/main folder. Copy the folders armeabi-v7a, arm64-v8a and x86 there.
- Copy the assets/ folder in your application src/main/ folder.
- 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:
1
2
3
4
|
<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:
- Uncompress the craftar-pro-sdk-android.zip
- Open your project in Android studio. In the project explorer, select the view Project Files.
- Create a folder libs in the root of the project. Copy all the .jars included in the libs folder of our SDK there.
- Create a folder jniLibs in the src/main folder. Copy the folders armeabi-v7a, arm64-v8a and x86 there.
- Copy the assets/ folder in your application src/main/ folder.
- 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:
1
2
3
4
5
|
<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:
1
2
3
4
5
|
<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"/>
|
Comments
0 comments
Article is closed for comments.