Entry point
In app logic, you mainly interact with a GlassesClient instance provided by the host app template.
Operations
capturePhoto()(photo capture)display()(text display)startMicrophone()(microphone capture)
Note: the SDK’s host app template owns the connection lifecycle and permissions UI. Your app logic typically focuses on the operations below.
Photo capture
val image = client.capturePhoto().getOrThrow()
val jpegBytes = image.jpegBytes
Text display
client.display("Hello from xg.glass").getOrThrow()
Microphone capture
val session = client.startMicrophone().getOrThrow()
// session.audio is a Flow<AudioChunk>; collect it and stop when done.
// ...
session.stop()