App–glasses communication
Define identity, protocols, message channels, and acknowledgments for phone Web and glasses GMP, and handle disconnection and recovery.
Build paired communication with acknowledgments#
The phone suits configuration, networking, and complex interactions; the glasses suit immediate display and input. Use Web Bridge for standard display. For custom logic, select matching GMP and MMPKG components and agree on channels, data formats, and result acknowledgments.
- Run an existing paired example such as Display Control Lab first to verify the environment and default protocol.
- When copying, check C and Web application identities, protocol versions, message channels and permissions scope together.
- Register the pending request before sending the command, then confirm completion using requestId and the business result. A successful send is only a transport-layer result.
- Handle disconnections, timeouts, and either side exiting. Query the actual state after reconnection to avoid repeating old tasks.