[ROKID] CXR-M SDK Changelog: 1.0.4 -> 1.0.8

February 6, 2026 · 1.0.4 → 1.0.8 Upgrade guide
[ROKID] CXR-M SDK Changelog: 1.0.4 -> 1.0.8

1. Breaking Changes

These are changes to existing method signatures and interfaces that will require updates in the targeting library.

1.1. CXRServiceBridge.StatusListener — Connection Callbacks (Internal Bridge Only)

⚠️ Kotlin migration note:

This section describes changes to CXRServiceBridge.StatusListener, which is the low-level internal bridge interface. The public-facing BluetoothStatusCallback interface is unchanged between 1.0.4 and 1.0.8 — onConnected() still takes no parameters. If you implement BluetoothStatusCallback, no changes are needed for the connection callbacks. The startBTPairing and getClassicMacAddress methods listed in this changelog do not exist on the public CxrApi class.

Method1.0.41.0.8
onConnected(String str, int i)(String str, String str2, int i) — added MAC address parameter
onConnectingdid not exist(String str, String str2, int i) — new callback

iOS device type constants split:

  • 1.0.4: DEVICE_TYPE_IOS = 2
  • 1.0.8: DEVICE_TYPE_IOS_GATT = 2, DEVICE_TYPE_IOS_MFI = 3

1.2. AudioStreamListener — All Methods Changed

Method1.0.41.0.8
onStartAudioStream(int codec, String cmd)(int streamId, int codec, String cmd) — added stream ID
onAudioStream(byte[] data, int offset, int size)(int streamId, byte[] data, int offset, int size) — added stream ID
onAudioStreamFinishdid not exist(int streamId) — new method

1.3. ArtcListener.onArtcFrame — Signature Changed

1.0.41.0.8
onArtcFrame(byte[] data)onArtcFrame(byte[] data, long timestamp) — added timestamp

1.4. CxrApi.openAudioRecord — Signature Changed

1.0.41.0.8
openAudioRecord(int codec, String cmd)openAudioRecord(int codec, int mode, String intent, int denoiseMode)
openAudioRecord(int codec, int mode, String intent) — overload, defaults denoiseMode=2

🔍 Note:

The Caps-based flexible parameter was replaced with explicit typed parameters (mode, denoiseMode). Internally, openAudioRecord now calls a native method directly instead of building a Caps message.

1.5. WifiController.init — Signature Changed

1.0.41.0.8
init(Context, String deviceName, Callback)init(Context, String deviceName, String macAddress, Callback) — added MAC address

1.6. WifiP2PStatusCallback — New Method

Method1.0.41.0.8
onP2pDeviceAvailabledid not exist(String name, String address, String info) — new callback

1.7. CxrController Architecture — Singleton → Instance for BluetoothController

CxrController no longer uses BluetoothController.getInstance(). Instead, it holds a private BluetoothController instance field initialized in the constructor. All internal calls changed from BluetoothController.getInstance().method() to this.bluetoothController.method(). The CxrController is still a singleton, so there’s effectively one BluetoothController in practice.

1.8. CXRSocketProtocol — Thread Safety & Auth

  • request() and send() are now synchronized (were not in 1.0.4)
  • changeRokidAccount() is now synchronized with null-check guard
  • nativeDestroy() cleanup is now wrapped in synchronized block
  • New setAuthPtr(long) method — sets an auth pointer used by nativeHandleReadPacket
  • nativeHandleReadPacket signature changed: added auth pointer as first parameter
  • Return code 101 from nativeHandleReadPacket now resets the auth pointer to 0

2. New Features

2.1. Audio Streaming API (Smartphone → Glasses)

A complete new API for pushing audio data from the smartphone to the glasses. This enables TTS playback, audio notifications, and other phone-to-glasses audio use cases.

New methods on CxrApi:

MethodSignaturePurpose
startPlayAudioboolean startPlayAudio(int sampleRate, int channelCount, float volume, int mode)Start audio playback on glasses
openAudioStreamvoid openAudioStream(int codec, int mode, String intent, Caps caps)Open an outgoing audio stream
writeAudioStreamvoid writeAudioStream(int streamId, byte[] data, int offset, int size)Write PCM/encoded data to stream

⚠️ Kotlin migration note:

finishAudioStream(int) and cancelAudioStream(int) exist only as native methods on CXRSocketProtocol (internal). They are not exposed on the public CxrApi class. Audio stream completion is reported via the AudioStreamListener.onAudioStreamFinish(int streamId) callback instead.

New native methods in CXRSocketProtocol (internal, not on CxrApi):

  • nativeStartAudioStream(long handle, int codec, int mode, String intent, Caps caps)
  • nativeWriteAudioStream(long handle, int streamId, byte[] data, int offset, int size)
  • nativeFinishAudioStream(long handle, int streamId)
  • nativeCancelAudioStream(long handle, int streamId)
  • nativeOpenAudioRecord(long handle, int codec, int mode, String intent, int denoiseMode)

2.2. Real-Time Camera Streaming

New MediaStreamListener interface for receiving live camera frames from glasses:

MethodSignaturePurpose
onCameraOpened()void onCameraOpened()Camera successfully started
onCameraClosed()void onCameraClosed()Camera stopped
onCameraError()void onCameraError()Camera error occurred
onCameraFrame(byte[] data, long timestamp)Frame data + timestampRaw frame data (YUV/JPEG) per frame

New CxrApi methods for camera control:

MethodSignaturePurpose
setMediaStreamListenervoid setMediaStreamListener(MediaStreamListener)Register the listener
openCameraVideoCxrStatus openCameraVideo(int width, int height, int rotate, int encoderMode)Open camera stream. Max 1280px. Hardcoded 10fps.
closeCameraVideoCxrStatus closeCameraVideo()Close camera stream
isGlassCameraInUseboolean isGlassCameraInUse()Checks if camera is in use by recording/AI/payment

🔍 Note:

onARTCFrame in the inner callback class now dispatches to MediaStreamListener.onCameraFrame() instead of ArtcListener.onArtcFrame().

2.3. Glass Status Monitoring

New GlassStatusUpdateListener interface:

MethodSignaturePurpose
onWearingStatusUpdated(String status)Wearing state changeDetects if user put on / removed glasses
onGlassGlobalTtsStatusUpdated(String status)TTS state changeGlobal TTS enabled/disabled state

CxrApi setter: setGlassStatusUpdateListener(GlassStatusUpdateListener)

2.4. Bluetooth Peripheral Management

New classes and API for managing Bluetooth peripherals connected to the glasses (headphones, keyboards, etc.):

New classes:

  • BluetoothPeriphInfo — Data class with fields: address (String), bondState (int), name (String), type (int), connectState (boolean). Uses Gson @SerializedName annotations.
  • PeriphDeviceCallback — Interface: onBluetoothPeriphList(CxrStatus, List<BluetoothPeriphInfo>)

New CxrApi methods:

MethodSignaturePurpose
wordTips_startBtPeriphScanCxrStatus wordTips_startBtPeriphScan()Start BT peripheral scanning on glasses
wordTips_StopBtPeriphScanCxrStatus wordTips_StopBtPeriphScan()Stop BT peripheral scanning
wordTips_setBtPeriphCxrStatus wordTips_setBtPeriph(String name, String addr, int type, int bondState)Pair/connect a BT peripheral
wordTips_removeBtPeriphCxrStatus wordTips_removeBtPeriph(String name, String addr, int type, int bondState)Remove a BT peripheral
wordTips_getBoundBtPeriphsCxrStatus wordTips_getBoundBtPeriphs(PeriphDeviceCallback)Query all bound peripherals

2.5. WiFi Hotspot Support

New classes:

  • WifiHotStatusCallback — Interface: onWifiHotAvailable(String ssid, String password, String ip, int type)

New CxrApi methods:

MethodSignaturePurpose
initWifiHotCxrStatus initWifiHot(WifiHotStatusCallback)Initialize WiFi hotspot sync mode
deinitWifiHotCxrStatus deinitWifiHot()Deinitialize WiFi hotspot sync

2.6. WiFi Network Scanning

MethodSignaturePurpose
startGetWifiListCxrStatus startGetWifiList(WifiListCallback)Start scanning WiFi networks visible to glasses
stopGetWifiListCxrStatus stopGetWifiList(boolean onlyStopScan)Stop WiFi scanning

2.7. Settings Management

New methods to push settings to the glasses, all sending “Settings_Update” on the “Settings” channel:

MethodSettings Key
setMsgNotificationSoundEnabled(String)settings_msg_notification_sound_enabled
setMsgNotificationDisplayDuration(String)settings_msg_notification_display_duration
setAppIsOverseas(String)settings_app_is_overseas
setScheduleTtsEnabled(String)settings_schedule_tts_enabled
setVoiceCtrl(String)settings_voice_control
setLongPressFun(String)settings_interaction_longPressFun
setWearingSensitivity(String)settings_wearing_sensitivity

2.8. Schedule/Memo Sync

MethodSignaturePurpose
syncScheduleCxrStatus syncSchedule(List<ScheduleInfo>, int type)Sync schedules (type=0) or memos (type!=0)
addScheduleCxrStatus addSchedule(ScheduleInfo)Add a single schedule
removeScheduleCxrStatus removeSchedule(ScheduleInfo)Remove a single schedule

2.9. App Management Extensions

MethodSignaturePurpose
stopAppCxrStatus stopApp(String packageName, ApkStatusCallback)Stop a running app on glasses
isGlassAppInstalledCxrStatus isGlassAppInstalled(String packageName, ApkStatusCallback)Query if app is installed

2.10. Translation Language Configuration

MethodSignaturePurpose
setTranslationLanguageCxrStatus setTranslationLanguage(String from, String to, String modeInfo)Set translation source/target language

2.11. Factory Reset

MethodSignaturePurpose
notifyGlassRecoveryCxrStatus notifyGlassRecovery()Sends “Sys_RestoreFactory” — factory reset glasses

⚠️ Important:

This is a destructive operation with no confirmation prompt from the SDK side. Make sure to implement your own confirmation UI before calling this method.

2.12. Misc New Methods

MethodSignaturePurpose
sendExitEvent(boolean)CxrStatus sendExitEvent(boolean isPlaySound)Exit with control over exit sound
notifyTtsAudioFinished(boolean)CxrStatus notifyTtsAudioFinished(boolean flag)TTS finished notification with boolean param
initWifiP2P2CxrStatus initWifiP2P2(boolean connect, WifiP2PStatusCallback)WiFi P2P init with connection control flag
appLaunchnative void appLaunch()New native method on CXRServiceBridge (internal)

⚠️ Kotlin migration note:

getClassicMacAddress() does not exist on the public CxrApi class (verified via javap). It was listed in the original changelog but cannot be called from consuming code.

2.13. File Sync Refactoring

startSync and syncSingleFile were refactored to delegate to new methods that accept an explicit address parameter:

New MethodSignature
startSync2boolean startSync2(String path, CxrMediaType[] types, String address, SyncStatusCallback)
syncSingleFile2boolean syncSingleFile2(String path, CxrMediaType type, String file, String address, SyncStatusCallback)

🔍 Note:

The original methods still exist but now delegate to these, using the internal WiFi P2P address.

3. Modified Behavior

3.1. WifiController — Significantly Overhauled

The WiFi P2P connection logic was substantially improved for reliability:

Aspect1.0.41.0.8
Device matchingBy device nameBy MAC address
Max retries310
Connection timeout15 seconds30 seconds
Retry delay1 second2 seconds
Discovery mechanismSingle discoverPeers callPeriodic discovery with retry logic (up to 10 attempts)
BUSY error handlingNoneRetries after 2s delay on error code 2
Network state checkisConnected()isConnectedOrConnecting()
Unknown network stateTriggers deinitEarly return (skip deinit)
Broadcast receiver3 actions4 actions (added THIS_DEVICE_CHANGED)
Target not found in peersSilent returnContinue discovering with m42e()

3.2. SceneStatusInfo — New Field

Added mixRecordRunning (boolean) field with getter/setter, indicating whether a combined audio+video recording is active. Used by the new isGlassCameraInUse() method.

3.3. CxrApi onValueUpdate — Expanded

The onValueUpdate handler grew from 2976 to 3901 instructions (~31% larger), reflecting all the new message types being handled (peripherals, WiFi list, glass status, camera, settings, schedules, etc.).

3.4. CxrApi deinitWifiP2P — Reset Flag

Now resets the WiFi P2P connection control flag (this.m = true) on deinit.

4. Native Library Changes

4.1. Removed: libcxr-sock-rfcomm-jni.so

The dedicated RFCOMM Bluetooth socket library was completely removed from both architectures. Its functionality was merged into libcxr-sock-proto-jni.so.

4.2. Size Changes

Libraryarm64-v8a 1.0.4arm64-v8a 1.0.8Change
libcxr-sock-proto-jni.so207 KB614 KB+196% (3x)
libcxr-bridge-jni.so111 KB112 KB+1.1%
libcxr-sock-rfcomm-jni.so52 KBRemoved
libcaps.so107 KB107 KBUnchanged
libflora-cli.so157 KB157 KBUnchanged
libmutils.so417 KB417 KBUnchanged
classes.jar120 KB133 KB+10.5%

🔍 Note:

The overall AAR size increased by ~34% (arm64) due to the massive growth of libcxr-sock-proto-jni.so, which absorbed RFCOMM functionality plus the new audio streaming and auth native code.

5. Unchanged Files

The following files had zero functional changes (only JADX decompiler renumbering artifacts):

  • Constants.java — identical
  • AudioController.java — identical
  • FileController.java — identical (including inner classes C0023a/C0024a, C0024b/C0025b)
  • Caps.java — identical
  • LogUtil.java — identical
  • ValueUtil.java — identical (all enums preserved)
  • CheckUtil.java — identical
  • Md5Util.java — identical
  • GlassInfo.java — identical
  • IconInfo.java — identical
  • RKAppInfo.java — identical
  • RKWifiInfo.java — identical
  • ScheduleInfo.java — identical
  • RetrofitClient.java — identical
  • RetrofitService.java — identical
  • FileData.java — identical
  • FileListResponse.java — identical
  • BaseNetworkResponse.java — identical
  • HeaderInterceptor.java — identical
  • All existing callbacks (except WifiP2PStatusCallback) — identical
  • All existing listeners (except AudioStreamListener, ArtcListener) — identical
  • BuildConfig.java (cxr package) — identical
  • Obfuscated helper classes (C0000a, C0001a, C0002a) — identical
Marcin Miazga