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 help@glassly.ai.
session.heading reports the phone’s compass heading. Subscribe with onUpdate() to get a HeadingData every time the heading changes.
src/background/index.ts
Heading needs the LOCATION permission in your manifest, the same key session.location uses.

Continuous updates

onUpdate() delivers a HeadingData on each heading change. It returns an unsubscribe function.

HeadingData

Permission

session.heading.hasPermission is true when LOCATION is declared in your manifest. It reports the manifest declaration, not the OS grant: if the user denied the system location prompt, onUpdate() produces no reading. See Permissions.
session.heading works on both Android and iOS. It shares the LOCATION manifest key with session.location.