Configuration Types
This page documents the interfaces and types used for configuring apps in the MentraOS SDK.AppConfig
Represents the structure of theapp_config.json file, defining metadata and settings for an app.
AppSetting
Union type representing a specific, configurable application setting. Used inAppConfig and AppSettings.
AppSettingType enum defines the available types of settings:
AppSettingType.TOGGLE- A boolean toggle/switchAppSettingType.TEXT- A text input fieldAppSettingType.SELECT- A dropdown selection
Toggle Setting Example
Text Setting Example
Select Setting Example
GroupSetting
A pseudo-setting used inAppConfig to group related settings visually in the UI. It doesn’t hold a value.
AppSettings
An array ofAppSetting objects, representing the complete set of settings for an app instance, including current user values.
Working with Settings
Accessing Setting Values
To access a specific setting’s value:getSetting() and getSettings() methods are available on the AppSession class.
Reacting to Setting Changes
onSettingsUpdate() and onSettingChange() methods are available on the EventManager class, accessed via appSession.events.
Automatic Subscription Management Based on Settings
setSubscriptionSettings() method is available on the AppSession class. It allows automatic management of StreamType subscriptions based on setting changes.
