Permissions
MentraOS uses a permissions system to control which device data and system resources your app can access. This system ensures user privacy and transparency while allowing you to build powerful applications with access to the data streams you need.Overview
When you build an MentraOS app, you must declare which permissions your app requires to function. These permissions map directly to sensitive device capabilities like microphone access, location services, and notification data. Users can see exactly what permissions your app requires before installing it, and the system automatically enforces these permissions at runtime.How Permissions Work
The permissions system operates at two levels:- Declaration Level: You declare which permissions your app needs in the MentraOS Developer Console
- Runtime Level: The system automatically enforces these permissions when your app tries to access protected data streams
- The system checks if your app has declared the necessary permissions for the data streams it’s trying to access
- If device-level permissions (like microphone access) are disabled, your app receives error messages
- Users see exactly what data your app can access based on your permission declarations
Declaring Permissions
Using the Developer Console
To declare permissions for your app:- Log in to the MentraOS Developer Console
- Navigate to your app’s settings page
- Scroll to the Required Permissions section
- Click Add Permission to add a new permission
- Select the permission type from the dropdown
- Add a description explaining why your app needs this permission. This is shown to the user when they install your app.
- Save your changes
Available Permission Types
MentraOS defines five core permission types that map to device-level capabilities:1. MICROPHONE
- Purpose: Access to audio recording and speech processing
-
Data Streams Enabled:
TRANSCRIPTION
- Real-time speech-to-text conversionTRANSLATION
- Language translation of speechAUDIO_CHUNK
- Raw audio data for advanced processingVAD
- Voice activity detection- Language-specific streams (e.g.,
transcription:en
,translation:fr
)
- Common Use Cases: Voice assistants, transcription apps, language translation, voice commands
2. LOCATION
- Purpose: Access to device location services
-
Data Streams Enabled:
LOCATION_UPDATE
- Real-time GPS coordinates
- Common Use Cases: Navigation apps, location-based reminders, weather apps, local search
3. CALENDAR
- Purpose: Access to device calendar events
-
Data Streams Enabled:
CALENDAR_EVENT
- Calendar event information
- Common Use Cases: Schedule management, meeting reminders, productivity apps
4. CAMERA
- Purpose: Access to camera for photo capture and video streaming
-
Data Streams Enabled:
PHOTO_RESPONSE
- Photo capture responsesPHOTO_TAKEN
- Photo capture eventsRTMP_STREAM_STATUS
- RTMP streaming status updatesMANAGED_STREAM_STATUS
- Managed streaming status updates
- Common Use Cases: Photo documentation, live streaming, video recording, security monitoring
5. READ_NOTIFICATIONS
- Purpose: Access to device notifications
-
Data Streams Enabled:
PHONE_NOTIFICATION
- Incoming notification dataNOTIFICATION_DISMISSED
- Notification dismissal events
- Common Use Cases: Notification filtering, smart alerts, communication apps
Permission Enforcement
Automatic Stream Filtering
When your app subscribes to data streams, the system automatically checks:- Permission Declaration: Does your app declare the required permission?
- Device Permission Status: Is the corresponding device permission enabled?
- Access Decision: Grant or deny access based on both criteria
Error Handling
When permission requirements aren’t met, you’ll receive error messages:Best Practices
1. Minimize Permissions
Only declare permissions that are essential for your app’s core functionality:2. Provide Clear Descriptions
Help users understand why your app needs each permission:3. Respect User Privacy
- Only access the data you actually use
- Process sensitive data securely
- Be transparent about data usage in your app description