BaseGlassesClient

abstract class BaseGlassesClient(initialCapabilities: DeviceCapabilities, eventBufferOverflow: BufferOverflow = BufferOverflow.DROP_OLDEST) : GlassesClient

Shared state, event, and connect lifecycle plumbing for device clients.

Constructors

Link copied to clipboard
constructor(initialCapabilities: DeviceCapabilities, eventBufferOverflow: BufferOverflow = BufferOverflow.DROP_OLDEST)

Properties

Link copied to clipboard
open override val capabilities: DeviceCapabilities
Link copied to clipboard

Total event emissions rejected since this client was created.

Link copied to clipboard
open override val events: Flow<GlassesEvent>

Non-fatal events (logs, warnings, tap events, etc.).

Link copied to clipboard
abstract val model: GlassesModel
Link copied to clipboard
open override val state: StateFlow<ConnectionState>

Connection lifecycle state.

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
suspend override fun connect(): Result<Unit>

Establish connection to the glasses (and any required side-channels like Wi‑Fi P2P).

Link copied to clipboard
abstract suspend fun disconnect()

Tear down connection and release resources. Safe to call multiple times.

Link copied to clipboard
abstract suspend fun display(text: String, options: DisplayOptions = DisplayOptions()): Result<Unit>

Display text on the glasses.

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.