This page documents all the enumeration types available in the MentraOS SDK. Enums are used to define sets of named constants that represent distinct values throughout the SDK.
Defines the different types or roles an app can have within the MentraOS system.
Copy
Ask AI
enum AppType { SYSTEM_DASHBOARD = 'system_dashboard', // Special UI placement, system functionality SYSTEM_APPSTORE = 'system_appstore', // System app store functionality BACKGROUND = 'background', // Runs without primary UI, can temporarily display content STANDARD = 'standard' // Regular app with standard lifecycle and UI interaction (default)}
Represents the lifecycle states of an app on the user’s device.
Copy
Ask AI
enum AppState { NOT_INSTALLED = 'not_installed', // App is not installed INSTALLED = 'installed', // App is installed but not running BOOTING = 'booting', // App is in the process of starting RUNNING = 'running', // App is currently active STOPPED = 'stopped', // App has been stopped (by user or system) ERROR = 'error' // App encountered an error}
Identifies the different predefined UI layout structures available for display.
Copy
Ask AI
enum LayoutType { TEXT_WALL = 'text_wall', // Single block of text DOUBLE_TEXT_WALL = 'double_text_wall', // Two blocks of text (top/bottom) DASHBOARD_CARD = 'dashboard_card', // Key-value pair style card (left/right text) REFERENCE_CARD = 'reference_card', // Card with a title and content text BITMAP_VIEW = 'bitmap_view' // Displays a bitmap image}
Identifies the different types of real-time data streams and events Apps can subscribe to.
Copy
Ask AI
enum StreamType { // Hardware streams BUTTON_PRESS = 'button_press', // Hardware button pressed on glasses HEAD_POSITION = 'head_position', // Head movement detected (e.g., up, down) GLASSES_BATTERY_UPDATE = 'glasses_battery_update', // Glasses battery level and status PHONE_BATTERY_UPDATE = 'phone_battery_update', // Connected phone battery level and status GLASSES_CONNECTION_STATE = 'glasses_connection_state', // Glasses connection info (e.g., model) LOCATION_UPDATE = 'location_update', // GPS location update // Audio streams TRANSCRIPTION = 'transcription', // Real-time speech-to-text results TRANSLATION = 'translation', // Real-time speech translation results VAD = 'VAD', // Voice Activity Detection status (speaking/not speaking) AUDIO_CHUNK = 'audio_chunk', // Raw audio data chunks (requires explicit subscription) // Phone streams PHONE_NOTIFICATION = 'phone_notification', // Notification received on the connected phone NOTIFICATION_DISMISSED = 'notification_dismissed', // Notification dismissed on the glasses/phone CALENDAR_EVENT = 'calendar_event', // Calendar event from the connected phone // System streams / Control actions originating from glasses START_APP = 'start_app', // User requested to start an app STOP_APP = 'stop_app', // User requested to stop an app OPEN_DASHBOARD = 'open_dashboard', // User requested to open the dashboard // Video streams VIDEO = 'video', // Video stream data (if available/supported) // Special subscription types (for cloud internal use primarily) ALL = 'all', // Subscribe to all possible streams WILDCARD = '*' // Wildcard subscription (similar to ALL)}
Identifies the type of request being sent from MentraOS Cloud to an app server’s webhook endpoint.
Copy
Ask AI
enum WebhookRequestType { SESSION_REQUEST = 'session_request', // Request to start a new app session for a user STOP_REQUEST = 'stop_request', // Request to stop an existing app session SERVER_REGISTRATION = 'server_registration', // Confirmation that the app server is registered SERVER_HEARTBEAT = 'server_heartbeat', // Periodic check to ensure the app server is responsive SESSION_RECOVERY = 'session_recovery' // Request to recover a session (e.g., after cloud restart)}