Overview
TheAppSession class represents an active connection to a user’s glasses session. It provides methods to:
- Subscribe to real-time events
- Display content on glasses
- Access hardware features
- Manage settings
Properties
Core Properties
Modules
Event Handling
All event handlers use thesession.events object:
Display Control
Show content on the glasses display:Capabilities
Check what hardware is available:Connection Management
The SDK handles connection management automatically:- Auto-reconnect: Reconnects if connection drops
- Grace period: Apps have 20 seconds to reconnect
- State preservation: Session state survives reconnections
Best Practices
Always check capabilities
Always check capabilities
Handle disconnections gracefully
Handle disconnections gracefully
Use TypeScript for better development
Use TypeScript for better development