session.glasses reports on the glasses hardware: battery level plus charging
state, and whether the glasses are connected. Both are subscriptions, so you get
a callback whenever the value changes.
src/background/index.ts
Battery
onBattery fires when the glasses report a new battery reading.
BatteryData has:
Connection
onConnection fires when the glasses connect or disconnect.
ConnectionData has:
modelName is optional, so guard for it before reading:
Cleaning up
Both methods return an unsubscribe function:session.glasses covers the glasses hardware. The phone has its own battery and
connection events on session.phone. For what
the connected glasses can do (display, camera, sensors), read
session.capabilities once the session is ready.
