Skip to content

Glass → receive messages & files

Purpose

Show how the glasses ingest phone-originated text, files, mirrored notifications, and PCM streams.

Entry points

Glass home:

  • HomeActivityMessageReceiveActivity

Sample screen:

  • com.rokid.glass.MessageReceiveActivity

Platform

  • Glass

Main file

Flow

  1. Register IMessageListener whenever the Activity resumes needing traffic.
  2. Install file listeners for BT + P2P lanes separately (directory routing differs).
  3. Subscribe to mirrored notification intents from the handset.
  4. Feed decoded PCM snippets into AudioTrack plumbing for preview.

Feature checklist

  • Text ingress
  • File saves
  • Streamed audio decode
  • Mirrored handset notifications
  • Optional face-notification snapshot archiving

FAQ

Where mirrored notifications surface

Handled through the glass-side notification bridge; this sample simply logs payloads—swap for HUD cards/timeline UX in product builds.

Caveats

  • Screen stays awake for marathon debug sessions — adjust wakelocks for prod.
  • Matching encoder parameters between sender/receiver avoids pops/dropouts.