CXR-L(EN)
CXR-L(EN)
IntroductionQuick StartDevelopment Flow & State-MachineTerms and Abbreviations
Feature Development
Version HistoryAndroid
iOS
cxr-l-sdk · v1.0.1 · snapshot 2026-05-13· ↗ source
Photo Capture
iOS: Photo Capture
Scenario
Trigger photo capture on the glasses and receive the JPEG byte stream as Data in a callback, then decode it into a UIImage for display or persistence on the phone.
Prerequisites
- Authentication has succeeded and the link is ready (see “Connection and Session”).
- The glasses-side scene is built: same as on Android, call
takePhoto/takePhotoWithDataonly after the Custom View is running or the Custom App has been launched; avoid triggering capture merely when “connected”.
Key APIs (by name)
takePhotoWithData(width:height:quality:callback:): specify width/height and compression quality, and receiveDatain the callback.
Example skeleton
client.takePhotoWithData(width: 1920, height: 1080, quality: 80) { data in
let image = UIImage(data: data)
// Update UIImageView, etc.
}
You can align parameters with the Android Sample 1024 x 768 quality 80 for joint debugging, then adjust per product.
Development suggestions
- Higher resolution increases transfer latency.
Sample entry points (typical)
| Action | Common demo method name |
|---|---|
| Simple capture | takePhotoTapped |
| Capture with data callback | takePhotoWithDataTapped |
| Preview view | photoPreviewImageView |
Please follow the actual code in ios_cxr_l_sample.