Skip to main content

Configuration Types

This page documents the interfaces and types used for configuring apps in the MentraOS SDK.

AppConfig

Represents the structure of the app_config.json file, defining metadata and settings for an app.
Example:

AppSetting

Union type representing a specific, configurable application setting. Used in AppConfig and AppSettings.
The AppSettingType enum defines the available types of settings:

Toggle Setting Example

Text Setting Example

Select Setting Example

GroupSetting

A pseudo-setting used in AppConfig to group related settings visually in the UI. It doesn’t hold a value.
Example:

AppSettings

An array of AppSetting objects, representing the complete set of settings for an app instance, including current user values.
Example:

Working with Settings

Accessing Setting Values

To access a specific setting’s value:
The getSetting() and getSettings() methods are available on the AppSession class.

Reacting to Setting Changes

The onSettingsUpdate() and onSettingChange() methods are available on the EventManager class, accessed via appSession.events.

Automatic Subscription Management Based on Settings

The setSubscriptionSettings() method is available on the AppSession class. It allows automatic management of StreamType subscriptions based on setting changes.