Glassly Miniapp SDK betaThe SDK is in beta, so its APIs may change before general availability.Developing on Mentra Live? We recommend using the
Glassly Bluetooth SDK.The developer tools are available in the Glassly App under Settings →
Miniapp Developer Settings.Share feedback with an in-app bug report, on
Discord, or by email at
[email protected].
MANAGE_MINIAPPS can discover other miniapps and control
their lifecycle, miniapps that declare PLATFORM_SETTINGS can read and write
host settings, and system miniapps can use a small set of privileged device
controls. Invoking the actions other miniapps
expose is open to every miniapp and documented here because the error surface is
shared.
Discover and control miniapps
session.miniapps lists installed miniapps and starts or stops them. It needs
MANAGE_MINIAPPS. session.miniapps.hasPermission is true when the manifest
declares it.
session.miniapps.stopSelf() is not permission-gated. Any miniapp can call it to
stop itself; the host tears the background context down shortly after. It’s
fire-and-forget with no reply, so flush any pending work first.
Each list entry can include hidden?: boolean and system?: boolean. Leave
out entries with either set when building a glasses menu: hidden means the
wearer took the miniapp off the home grid, and system marks the host’s
built-in phone pages (Store, Settings, Glasses Mirror and the like) and
dashboards. Older hosts omit both.
Platform settings
session.settings reads and writes an allowlisted subset of the host’s
settings. It needs PLATFORM_SETTINGS; session.settings.hasPermission is true
when the manifest declares it. Writes go through the same persistence, server sync, and applicable
Bluetooth sync as the Glassly App’s settings screens. For your own miniapp’s
preferences, use storage.
Writable keys are
contextual_dashboard, twelve_hour_time, menu_apps, and
the notification enable/popup/filter settings. custom_dashboard_enabled and
notification_seen_apps are read-only. A dashboard keeps its own look settings
in session.storage.
The bridge also supplies read-only derived values: phone_active and
foreground_app_on_screen (booleans), ring_battery
({connected: boolean, level: number}, with -1 for an unknown level), and
active_dashboard (the package name that holds the dashboard role, or null).
set rejects unknown keys or missing values with INVALID_ARGUMENT,
read-only keys with NOT_PERMITTED, and failed store writes with INTERNAL.
Handle missing keys on older hosts; the generic on get<T> does not validate
the value at runtime.
Notification app discovery
session.phone.notifications.installedApps() returns
Promise<NotificationAppInfo[]> for building a notification filter UI. Each
entry is {packageName: string, appName: string, icon: string | null}.
Android lists installed apps with base64 PNG icons. iOS cannot enumerate
installed apps, so it returns a seeded catalog plus apps the glasses reported
posting notifications, without icons. This request needs READ_NOTIFICATIONS.
Invoke an action
session.actions.invoke calls an action another miniapp exposed via
session.actions.handle. It headless-wakes the target if it’s stopped, runs the
handler, and returns the result. Any miniapp can call it; only actions the target
declared with visibility: "system" are restricted to system callers.
invoke() rejects with { code, message } where code is one of:
A thrown handler in the target surfaces its own error message to the caller.
The action descriptor returned by
session.miniapps.list() includes an optional
outputSchema, which describes the structured result for result-aware callers.
Privileged device controls
Wi-Fi ADB (Mentra Live)
session.glasses.setWifiAdbState toggles wireless debugging on Mentra Live.
The preference is persisted on the glasses and reapplied at boot (default
off). Non-system callers get NOT_PERMITTED.

