Android Dependency Resolution Fails
Maven publishing is paused, and Maven Central has only old0.1.0-dev builds of ai.glassly:bluetooth-sdk, which do not match these docs. Use the React Native package for now. The checks below apply when the Android package publishes.
- Confirm your app has
google()andmavenCentral()configured. - Confirm
ai.glassly:bluetooth-sdk:<version>matches the SDK version you are integrating. - Confirm Gradle can resolve the companion
ai.glassly:lc3Libartifact transitively. - If a version was just published, Maven Central mirror propagation can lag briefly. Retry after the artifact appears under
https://repo.maven.apache.org/maven2/ai/glassly/.
Android Build Fails On Native Libraries
- Confirm Android min SDK is at least
28. - Confirm Java 17 is used by Gradle.
- If your app also includes native media or camera dependencies, add
pickFirsts += "**/libc++_shared.so"underandroid.packaging.jniLibs. - Confirm no app-level packaging rule excludes
libc++_shared.soor SDK native libraries. - Clean only the app build output first. Do not delete SDK source artifacts unless you are intentionally resetting your workspace.
iOS Swift Package Resolution Fails
SwiftPM publishing is paused, so theBluetoothSDK Swift package does not resolve yet. Use the React Native package for now. The checks below apply when the iOS package publishes.
Check that your iOS deployment target is at least 15.1 and that Xcode resolves the selected SDK version. If Xcode has stale package state, reset package caches and resolve packages again from Xcode.
If your app also uses Firebase with static frameworks, Firebase modular header configuration belongs in your app, not in the Bluetooth SDK.
React Native Native Module Is Missing
- Confirm you are running a development build or production native build. Expo Go cannot load
@glassly/bluetooth-sdk. - Run
bunx expo prebuildafter adding the SDK plugin toapp.json. - Confirm
@glassly/bluetooth-sdkis installed in the app that is being prebuilt. - On iOS, rerun
bunx expo run:iosafter changing native module dependencies. - If you are testing a local SDK package, set
BLUETOOTH_SDK_PACKAGE_PATHto the same package path you installed with Bun.
Bluetooth Permission Problems
- Android 12+ requires runtime Bluetooth scan/connect permissions.
- Android scanning may require location permission or Location services depending on OS version and device policy.
- On some Android 12+ devices, scans can start successfully but return zero callbacks until
ACCESS_FINE_LOCATIONis granted. - iOS requires
NSBluetoothAlwaysUsageDescription. - Microphone/audio features require
RECORD_AUDIOon Android andNSMicrophoneUsageDescriptionon iOS.
No Devices Found
- Confirm the glasses are charged and in pairing mode.
- Confirm OS Bluetooth permissions are granted.
- On Android, confirm location permission is granted and device Location services are enabled.
- Confirm the selected
DeviceModelmatches the target glasses family. - Stop and restart scanning from the UI instead of scanning indefinitely.
- Try pairing from a clean Bluetooth state after forgetting the device.
RayNeo iO Pairing Fails
When the RayNeo iO is bound to another phone, is not the pair this app last connected, or fails authentication, the SDK stops and emitspair_failure with error set to errors:pairNeedDisconnect. A handshake that never completes reports the same error. Disconnect the glasses in the phone’s Bluetooth settings (and on any other phone), call forget(), then scan and connect again.
Connected But No Events
- Subscribe before connecting.
- In React Native, render
useBluetooth()state for connection, battery, Wi-Fi, hotspot, scan, and SDK state. In native Android/iOS apps, log the SDK status objects. - Confirm the hardware feature is available on the connected model.
- Watch SDK log callbacks for native diagnostics.
Connected But SDK Features Fail
Bluetooth connection does not confirm that the mobile SDK and the glasses software versions match, and glasses software older than the SDK may cause feature failures on Mentra Live. Matching Mentra Live software cannot be installed through the SDK yet; see Update Mentra Live. CallrequestVersionInfo() to read the glasses versions, watch the SDK log events, and ask on Discord if a feature still fails.
Optional Local Stream Preview Does Not Show Video
The local demo cloud ships in the Starter Kit, which is not available yet.- The local demo cloud is only needed when the starter app’s Stream screen has Use cloud server enabled. If you are using that optional local stream preview, confirm the local demo cloud or MediaMTX helper is running.
- Use the printed LAN URL, not
localhost, in the example app’s RTMP or WebRTC field. - Confirm the glasses, phone, and computer are on a network where local device-to-device traffic is allowed.
- Confirm Mentra Live is connected to Wi-Fi before starting the stream.
- For RTMP, the native iOS example embeds the derived HLS preview URL while live. You can also open or refresh the printed HLS preview URL on your computer after tapping Start stream.
- If Docker is running in bridge mode, confirm UDP ports
8890and8189are published. - If the helper picked the wrong network interface, restart it with
python3 examples/local-demo-cloud/server.py --host-ip <computer-lan-ip>.
React Native Or Expo Apps
React Native and Expo apps use the@glassly/bluetooth-sdk package and must run as development builds or production native builds. Expo Go cannot load the native SDK.
If Android prebuild succeeds but native linking fails, confirm the generated project includes :lc3Lib in android/settings.gradle. The SDK plugin adds this module automatically during prebuild.
If iOS builds fail with missing Expo adapter symbols, rerun bunx expo prebuild so the SDK plugin can configure the Podfile for Expo module registration.
