Skip to content

Glass settings sync

Purpose

Demonstrate how the phone sends configuration, system-info requests, brightness, volume, and custom wake settings to the glasses through DeviceLinkerManager.

Entry points

Core helpers:

  • DeviceLinkerManager.sendConfig(...)
  • DeviceLinkerManager.getGlassSystemInfoMsg()
  • DeviceLinkerManager.setBrightness(...)
  • DeviceLinkerManager.setVolume(...)
  • DeviceLinkerManager.setCustomWake(...)

Platforms

  • Phone
  • Glass (applies mirrored payloads)

Main files

Synced configuration fields

The current Config model contains:

  • configVersion: configuration version.
  • envType: environment type.
  • showToHide: apps shown by default but hidden by this configuration.
  • hideToShow: apps hidden by default but shown by this configuration.
  • voiceAction: offline voice commands.

Brightness, volume, and custom wake settings are not fields inside Config; they are sent through dedicated DeviceLinkerManager methods.

Flow

  1. The phone prepares a Config object.
  2. After Bluetooth is connected, call DeviceLinkerManager.sendConfig(config).
  3. To query system information, call DeviceLinkerManager.getGlassSystemInfoMsg().
  4. To update brightness, volume, or custom wake settings, call the corresponding DeviceLinkerManager method.
  5. The glasses apply the message according to the business protocol.

Implementation notes

DeviceLinkerManager.sendConfig(config) converts Config into a custom message and sends it over the classic Bluetooth message channel.

kotlin
DeviceLinkerManager.sendConfig(MyApplication.config)

Brightness, volume, and custom wake are sent as immediate commands:

kotlin
DeviceLinkerManager.setBrightness(progress)
DeviceLinkerManager.setVolume(progress)
DeviceLinkerManager.setCustomWake(true)

Caveats

  • Config fields are part of the business protocol between the phone and glasses.
  • If you add new configuration fields, update the sender, receiver, and glasses-side handling together.