GlassesClient
interface GlassesClient
A minimal, unified API for AI glasses.
Design goals:
Keep app developers on a stable API surface
Hide transport differences (Frame BLE messages vs Rokid Wi‑Fi P2P sync)
Provide observability via state + events
Inheritors
Properties
Functions
Link copied to clipboard
abstract suspend fun capturePhoto(options: CaptureOptions = CaptureOptions()): Result<CapturedImage>
Capture a photo and return JPEG bytes (plus metadata when available).
Link copied to clipboard
Tear down connection and release resources. Safe to call multiple times.
Link copied to clipboard
open suspend fun displayImage(image: DisplayImage, options: DisplayImageOptions = DisplayImageOptions()): Result<Unit>
Display an encoded PNG/JPEG image on the glasses.
Link copied to clipboard
abstract suspend fun playAudio(source: AudioSource, options: PlayAudioOptions = PlayAudioOptions()): Result<Unit>
Play audio on the glasses.
Link copied to clipboard
abstract suspend fun startMicrophone(options: MicrophoneOptions = MicrophoneOptions()): Result<MicrophoneSession>
Start microphone capture and return a session that streams audio chunks.
Link copied to clipboard
open suspend fun startVideoStream(options: VideoStreamOptions = VideoStreamOptions()): Result<VideoStreamSession>
Start camera frame streaming and return a session that emits video frames.