# Glass → receive messages & files

## Purpose

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

## Entry points

Glass home:

- `HomeActivity` → `MessageReceiveActivity`

Sample screen:

- `com.rokid.glass.MessageReceiveActivity`

## Platform

- Glass

## Main file

- [MessageReceiveActivity.kt](https://gitee.com/as_pixar/glass3sdkdemo/blob/main/glassdemo/app/src/main/java/com/rokid/glass/MessageReceiveActivity.kt)

## 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.  
