M2Glasses Service
Service for managing the physical connection to the Maverick2 glasses and monitoring their hardware state.
Functions
Checks whether the glasses are currently detected on the user's face.
Returns a parsed human-readable description of the glasses serial number.
Disconnects the active transport session (BLE or WebSocket).
Enables or disables a hardware device component on the glasses.
Returns the major firmware version number as a string.
Returns the firmware version as a four-element array: [major, minor, patch, build].
Returns the current high-level connection status.
Returns the currently configured target BLE device address.
Returns the currently configured target device name.
Converts a raw core device-type byte to a human-readable device name.
Returns true when a target device is configured for connection.
Checks whether an external power source is physically connected.
Checks whether the battery is actively charging.
Checks whether the transport layer is currently connected.
Queries whether a specific hardware device component is currently enabled on the glasses.
Checks whether the proximity sensor is currently enabled.
Checks whether the glasses have reached the ConnectionStatus.Ready state, meaning all SDK services are fully operational.
Checks whether the WebSocket simulator transport has been configured.
Registers a listener for battery and charging state events.
Registers a listener for connection lifecycle events.
Registers a listener for system, touch, and power-button events.
Configure connection to a BLE device (glasses).
Configure connection to the WebSocket simulator transport.
Unregisters a previously registered battery event listener.
Unregisters a previously registered connection lifecycle listener.
Unregisters a previously registered system event listener.