CXR-L(EN)
cxr-l-sdk · v1.0.1 · snapshot 2026-05-13· ↗ source

SDK Integration

Android: SDK Import

Scenario

Integrate the CXR-L client library (client-l) into your Android app, configure the Maven repository and the minimum OS version, so the app can call APIs such as CXRLink.

Prerequisites

  • Android Studio and either Gradle Kotlin DSL or Groovy are supported. The steps below follow CXRLSample.
  • The device/emulator must satisfy minSdk (the Sample uses 31).

Repository configuration

Add Rokid’s Maven public repository in dependencyResolutionManagement.repositories of the project root settings.gradle.kts (same as the Sample):

maven { url = uri(“https://maven.rokid.com/repository/maven-public/) }
// Decide whether to include this depending on your situation
maven { url = uri(“https://maven.aliyun.com/repository/google”) }

Also keep common repositories such as google() and mavenCentral().

Dependency declaration

In dependencies of app/build.gradle.kts:

implementation(“com.rokid.cxr:client-l:1.0.1)

Note: if your local Sample or release notes use a different version, follow the project files and update the version string consistently in the docs.

Application and manifest (Sample)

  • Application class: the Sample uses com.rokid.cxrlsample.CXRLSampleApplication, registered via <application android:name=”…”> in AndroidManifest.xml, to keep sharedCxrLink: CXRLink? across Activities.
  • Permissions (Sample AndroidManifest.xml): at minimum INTERNET. If your flow involves APK install or media I/O, the Sample also includes MANAGE_MEDIA, MANAGE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE (maxSdkVersion=32), etc. Trim based on your product and comply with Android storage policies by OS version.
  • FileProvider: the Sample configures androidx.core.content.FileProvider for sharing WAV files, with authority ${applicationId}.fileprovider.

Sync and verification

  1. “Sync Project” completes without errors.
  2. You can import com.rokid.cxr.link.CXRLink successfully in any Activity.

Constraints

  • namespace and applicationId belong to your app and are unrelated to the target glasses-side package name (the packageName used by CUSTOMAPP).
  • Authorization depends on AuthorizationHelper that interacts with Rokid AI App (see next chapter). The corresponding app must be installed on a real device.

Sample reference paths

  • settings.gradle.kts
  • app/build.gradle.kts
  • app/src/main/AndroidManifest.xml
  • com.rokid.cxrlsample.CXRLSampleApplication
Marcin Miazga