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

Glasses Custom APP

iOS: Glasses-side Custom App

Scenario

On the phone side, query, install, start, stop, and uninstall an Android app package on the glasses.

Prerequisites

  • Authentication has succeeded and the link is available.
  • You know the target packageName and the optional activityName.
  • For install scenarios: the APK is included in the iOS project resources or can be copied to a readable path in the app sandbox.

Key APIs (by name)

  • queryApp(packageName:callback:)
  • installApp(_:callback:) (parameter is a local APK URL or path type; follow the SDK definition)
  • openApp(packageName:activityName:url:callback:)
  • stopApp(_:callback:)
  • uninstallApp(_:callback:)
Not installedInstalledqueryAppinstallAppopenAppstopApp_or_uninstallApp_optional

Common issues

  • Install failure: check that the APK is bundled correctly, the path is readable, and there is enough storage on the glasses.
  • Start failure: verify packageName / activityName match the Manifest, aligned with the idea of CONSTANT.APP_PACKAGE_NAME in the Android Sample.
  • Capability ordering: only after openApp succeeds and the glasses-side app reaches the agreed business state should you enable Audio, Photo, and Custom Command (use capability APIs only after scene building is completed).

Sample entry points (typical)

ActionCommon demo method name
Package constantsdemoPackageName
Query / install / start/stop / uninstallqueryAppTapped, installAppTapped, openAppTapped, stopAppTapped, uninstallAppTapped

Please follow ios_cxr_l_sample ViewController (or an equivalent class).

Marcin Miazga