Overview
This document discusses the process for setting up Android Studio to work with AI Data Capture SDK. The SDK and its models for various use cases are distributed as AAR libraries, which can be integrated into your Android Studio project via Gradle or manually. These libraries are available through Zebra's official Maven repository.
Requirements
- Zebra QC6490 mobile computer running Android 14 or higher
- Android project targeting SDK version 34 (Android 14) or higher
- Latest version of Android Studio installed
IMPORTANT NOTE:The current SDK version is available with a complimentary, unlicensed period and is scheduled to deactivate by the end of 2025. An updated version with enhanced features, including both free and paid licensed components, will be introduced later this year to replace this version.
Features & Models
The table below lists the SDK features along with their associated model names and versions required for setup. The model name and related information can be obtained by invoking methods from the AIVisionSDK class.
| Features | Model Name | Model Version |
|---|---|---|
| Barcode Decoder | N/A | N/A |
| Barcode Localizer | barcode-localizer | 3.1.0 |
| Product Recognizer | product-recognition-bundle | 3.2.0 |
| Shelf and Product Localizer | product-recognition-bundle | 3.2.0 |
| TextOCR | ocr | 1.3.0 |
Note: No model is required for Barcode Decoder.
Setup SDK
The AI Data Capture SDK and models can be integrated into an Android project either through Gradle or manually.
Once the SDK and models are added, you can proceed to develop application logic for localization, recognition, barcode decoding, or text OCR.
Method 1: Use Gradle
Follow these steps to include the SDK and models to your Android Studio project through Gradle:
Prepare the AndroidManifest.xml: Grant the necessary permissions for camera access and set the attribute
extractNativeLibsto true:<application android:extractNativeLibs="true"/>Update Gradle Settings: Open the application's version catalog file (
libs.versions.toml) and add definitions for the SDK and model. Specify the desired model version as needed:Define SDK and model versions, for example:
aiSdkVersion = "2.22.8" localizerVersion = "3.1.0"Note: Replace "localizerVersion" with the desired model and version.
Add the following in the
[libraries]section. Refer to the Features & Models section for the model name to use for "name."[libraries] … ai-sdk-version = {group ="com.zebra.ai.vision", name="Zebra-AI-Vision-SDK", version.ref ="aiSdkVersion"} barcode-localizer = { group ="com.zebra.ai.models", name="barcode-localizer", version.ref ="localizerVersion"}Note: The "version.ref" field must match the variable defined in the previous step.
Add Dependencies: In the app-level gradle file (
build.gradle.kts), add the dependencies for the SDK and model:dependencies{ …… implementation(libs.ai-sdk-version) { artifact { type ="aar" } } implementation(libs.barcode-localizer) { artifact { type ="aar" } } }Note: The string following "libs." must match the variable defined in the [libraries] section from the previous step.
Configure Gradle for No Compression: Ensure Gradle does not compress
.TARandTAR.CRYPTextensions:android{ … androidResources { noCompress.add("tar") noCompress.add("tar.crypt") } }Enter Maven Credentials: In the
settings.gradle.ktsfile, replace "USERNAME" with your username (registered with Zebra.com) and "artifactory-token" with your generated Artifactory token (see Generate Artifactory Token for details).maven { credentials { username = "USERNAME" password = "artifactory-token" } url = uri("https://zebratech.jfrog.io/ui/packages") }Note: For this initial release, ensure restricted access is enabled for your email ID and access token generated from Artifactory.
Sync Project: Synchronize the Android Studio project to ensure the models defined in the Gradle file are integrated into the workspace.
Include SDK Packages: Open Java project files (e.g.,
MainActivity.java) and incorporate the AI Data Capture SDK packages.
Generate Artifactory Token
Follow these steps to generate an identity token from JFrog:
In Zebra's Maven repository, click on Log in.

Click on SAML SSO and login with your SSO credentials.

From the Jfrog Platform screen, access the user menu and click on Edit Profile.

Click Generate an Identity Token.

Add a description, then click Next.

Copy the Reference Token and save it. Use this token in the password field for Maven credentials.

Note: Once this window is closed, the same token cannot be viewed again, but a new token can be generated.
Method 2: Manual
Follow these steps to manually include the SDK and models to your Android Studio project:
- Download the SDK and model
.AARfiles from Zebra's official Maven repository. - In Android Studio, create a "libs" folder within the
app/folder. - Copy the
.AARfiles into the "libs" folder. - Synchronize the project with the Gradle files.
Related Guides: