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].
com.glassly.dashboard, uses only the public Glassly Miniapp SDK, so a
dashboard you write can do everything it does.
One dashboard runs at a time, and the running one holds the dashboard
role. Starting a dashboard from the Glassly App stops the one running, and
only one dashboard can be Always On: marking yours clears the flag on the
others, so it is the one that starts with the app.
Manifest
Settype to "dashboard" and declare the permissions for the features you
build. The type makes your miniapp eligible for the role and grants nothing
else.
miniapp.json
alwaysOn starts the miniapp when the Glassly App launches. Only one dashboard
starts this way: if two dashboards’ manifests both ask for it, the first by
package name starts, until the wearer marks one Always On in the Glassly App.
What the role gives you
While your miniapp is running and the glasses can show the dashboard view (currently a G2 running Glassly CFW with the dashboard enabled):session.capabilities.display.viewsincludes"dashboard".session.display.showView("dashboard")takes the overlay slot above the main content, and frames rendered with{view: "dashboard"}reach the glasses.- If you subscribe to phone notifications, you are the notification viewer:
the host and the firmware leave presentation to you. That includes the
notifications other miniapps post: they arrive on the same stream with
system: falseandsourcenaming the miniapp (see Posting notifications).
READ_NOTIFICATIONS.
Without the role your miniapp is an ordinary miniapp: views is ["main"]
and showView("dashboard") resolves
{status: "unsupported", reason: "not the active dashboard"}. Watch
session.onCapabilitiesChange and release your gesture claims when the
dashboard view goes away.
A minimal dashboard
src/background/index.ts
What the bundled dashboard uses
The page system that switches between its dashboard, side menu, calendar and
notification pages is its own code. Write the one that suits your design.
Hosting widgets from other miniapps
A dashboard can show cards that other miniapps provide, such as the Spotify miniapp’s now playing card. DeclareHOST_WIDGETS and use session.widgets to
list the available widgets, place them in boxes you assign, draw the frames the
providers push, and forward the wearer’s swipes and taps. The bundled dashboard
places every external widget the wearer has put in a column. See
Provide a dashboard widget.
Settings you own
The active dashboard’s phone page is where the wearer edits the notification settings, the per-app notification filter and the Glasses Menu. The Glassly App has no screens of its own for them. If your dashboard replaces the bundled one, build those screens onsession.settings
or the wearer cannot change them while yours is running.
Keep your own preferences in session.storage,
not in platform settings.
Trying it
Run your miniapp from the dev server and start it from the Glassly App: starting it stops the dashboard that was running, and it holds the role until it stops. Mark it Always On to keep it as the dashboard across launches. Dev-loaded miniapps pass the permission checks without declaring anything, so check your manifest before you publish: a Store install withoutMANAGE_MINIAPPS or PLATFORM_SETTINGS rejects those
calls with PERMISSION_NOT_DECLARED.
