CXR-L(EN)
CXR-L(EN)
IntroductionQuick StartDevelopment Flow & State-MachineTerms and Abbreviations
Feature Development
Version HistoryAndroid
iOS
cxr-l-sdk · v1.0.3 · snapshot 2026-06-02· ↗ source
Quick Start
Quick Start
Environment prerequisites
- Real device or Bluetooth-debuggable environment, paired with target glasses.
- Rokid AI App (mainland, version ≥ 1.7.14) or Hi Rokid (overseas) installed.
- Understand capability prerequisites in the Introduction.
Get the phone-side Samples
Android (RenewCXRLSample, v1.0.3)
- Zip package:
https://rokid-ota.oss-cn-hangzhou.aliyuncs.com/toB/Document/CXR-L/v1.0.3/cxrlsampe.zip
iOS (ios_cxr_l_sample, v1.0.1)
- Zip package:
https://rokid-ota.oss-cn-hangzhou.aliyuncs.com/toB/Document/CXR-L/v1.0.1/iOS/ios_cxr_l_sample.zip
Glasses side (CXRSWithCXRLSample)
- Zip package:
https://rokid-ota.oss-cn-hangzhou.aliyuncs.com/toB/Document/CXR-L/v1.0.3/cxrssample.zip
Extract and open the cxrswithcxrl project in Android Studio; sync Gradle (https://maven.rokid.com/repository/maven-public/). Package com.rokid.cxrswithcxrl matches RenewCXRLSample CONSTANT.
Minimal verification path (Android)
- Open RenewCXRLSample in Android Studio; sync Gradle (
https://maven.rokid.com/repository/maven-public/). - Confirm SDK dependency is
com.rokid.cxr:client-l:1.0.3inapp/build.gradle.kts. - Build and install; confirm Rokid AI App ≥ 1.7.14 (mainland) or Hi Rokid (overseas).
- Complete authorization on the home screen; obtain
token. - Choose CustomView or CustomApp; enter
CxrSessionActivity. - Wait for link ready:
onCXRLConnected(true)andonGlassBtConnected(true)(both session types). - Complete scene building:
- CustomView: after link ready,
customViewSetIcons(if needed) andcustomViewOpen→onCustomViewOpened - CustomApp: APK installed (with storage permissions),
appStart→onOpenAppResult(true)
- CustomView: after link ready,
- Enter Audio / Photo from hub; Custom Command from CustomApp only.
Important: Use photo, audio, and custom commands only after scene building.
CustomApp joint-debug path (phone + glasses)
Under a CUSTOMAPP session, verify custom commands and key reporting:
- Install CXRSWithCXRLSample on glasses (or via
appUploadAndInstall). - Install RenewCXRLSample on the phone; complete auth and obtain
token. - Choose CustomApp → Session Hub; wait for link ready (CXR + Bluetooth).
- Complete scene building: install/start APK from Hub, receive
onOpenAppResult(true); glassesMainViewModelrunssubscribe(“rk_custom_client”, …). - Open Custom Commands: phone
sendCustomCmd↔ glassessendMessage. - Press leg keys, touchpad, or back on glasses; phone should receive
rk_custom_keypayloads.
Rendering diagram…
| Constant | Value |
|---|---|
APP_PACKAGE_NAME | com.rokid.cxrswithcxrl |
MAIN_PAGE | .activities.main.MainActivity |
appStart argument | ”${APP_PACKAGE_NAME}${MAIN_PAGE}” |
Minimal verification path (iOS)
- Configure Pod,
Info.plist, and URL callbacks per the iOS SDK Integration chapter. - Forward
CxrClient.shared.handleOpenURLinAppDelegate/SceneDelegate. - Call
client.auth.authenticate. - Establish link and complete scene building on glasses.
- Verify audio, photo, custom command per dedicated chapters.
Important: Same gating as Android — capabilities require scene building, not link-only success.
Appendix: RenewCXRLSample modules
| Module | Path |
|---|---|
| Home / auth | activities/main/ |
| Session hub | activities/session/SessionHubViewModel.kt |
| Connection | link/CxrLinkConnectionHub.kt, utils/CxrSessionGate.kt |
| Capabilities | activities/audio/, photo/, customCMD/ |
| Global link | app/CXRLApplication.kt |
| Glasses demo | CXRSWithCXRLSample — activities/main/, receiver/KeyReceiver.kt |