Skip to main content
Mentra Miniapp SDK betaThe SDK is in beta, so its APIs may change before general availability.There is currently no way to distribute a miniapp built with the Miniapp SDK. In a future release, developers will upload miniapps through the Mentra Developer Console, and users will download them from the Mentra Miniapp Store. Neither service supports Miniapp SDK distribution in MentraOS 3.0.Only use the Miniapp SDK if you are comfortable with these limitations.Developing on Mentra Live? We recommend using the Mentra Bluetooth SDK.The developer tools are available in the Mentra App under Settings → Miniapp Developer Settings.Share feedback with an in-app bug report, on Discord, or by email at help@mentra.glass.
session.system runs OS-level actions on the phone: open the native share sheet, save a file through the system downloader, copy text to the clipboard, or open a URL in the phone browser. None of these need a permission or any hardware.
src/background/index.ts

Share

share(options) opens the phone’s native share sheet. Pass text and a URL for a link share, or pass base64 with a mimeType to share file contents. The promise resolves once the sheet closes.

Download

download(options) saves a file. It opens the share sheet so the user picks where to save. Give it a url to fetch from, or base64 data you already have.
To export data your miniapp holds as binary, read it from session.blob, base64-encode it, and pass it to share or download.

Clipboard

copyToClipboard(text) copies a string to the system clipboard. It resolves when the copy is done.

Open URL

openUrl(url) opens a URL in the phone’s browser. It’s fire-and-forget: it returns void immediately and doesn’t report whether the browser opened. Dangerous schemes (javascript:, file:) are blocked.