Permissions and capability declarations
Declare the capabilities you call in the Web manifest, including the correct event types and message channels.
Current format#
This is the permissions portion of a manifest, to be used alongside id, name, version, entry, and other fields. permissions is an array of objects, not the older string-array format.
{
"schemaVersion": 2,
"permissionPolicyVersion": 1,
"bridgeVersion": "2.0",
"permissions": [
{
"name": "display",
"required": true
},
{
"name": "device.events",
"required": true,
"scope": {
"types": [
"button",
"connection"
]
}
},
{
"name": "device.messaging",
"required": true,
"scope": {
"channels": [
17475,
17476
]
}
}
]
}Supported permission names#
| Permission | Purpose |
|---|---|
| display | Standard glasses display operation. |
| device.info | Read device information. |
| device.events | Device events; scope.types specifies the event categories. |
| device.messaging | Custom plugin messages; scope.channels specifies the channel. |
| storage | Application data storage provided by host. |
| files.user-selected | Select and read user files through the host. |
| audio.capture | Audio capture. |
| audio.playback | Web audio playback. |
| network | Web network access. |
| location.foreground | Foreground location. |
Fields that are easy to get wrong#
- device.events.scope.types currently accepts only button, imuGesture, rawImu, and connection. Case must match exactly.
- device.messaging.scope.channels is an array of integers from 0–65535, with at most 64 unique entries. Declare both request and response channels.
- Other permissions have no scope. Do not add fields such as network.scope.domains or recording sample rates; permission validation rejects them. Pass business parameters through the corresponding SDK methods.
- reason can contain a short purpose description, currently up to 200 characters. required must be a boolean, not a string.
- The current App checks at startup whether declared permissions and scopes have been authorized. Do not promise that startup can proceed after denial solely because required:false is set. Verify the denial path on a physical device.
Troubleshooting permission failures#
- UNDECLARED: check whether the packaged manifest declares the capability.
- NOT_GRANTED: check authorization for this startup, not just the system camera/microphone switches.
- OUT_OF_SCOPE: check that all subscribed event types and send/receive channels are within scope.
- METHOD_NOT_FOUND: check that you use a current SDK method name. Old audio APIs and guessed methods are not allowed.
- NOT_SUPPORTED / CAPABILITY_UNAVAILABLE: Check if App, firmware, platform or current operational state supports this capability.
Differences between Studio and physical devices#
Desktop Studio validates calls and integration, and its current flow may approve declared permissions automatically. Verify real authorization, system permissions, account/installation isolation, background limits, and network restrictions in the App. A successful simulator call does not mean physical-device authorization has passed.
Reference files in the toolkit#
- PhoneSDK/packages/bridge-contract/src/permission-policy.js
- PhoneSDK/examples/permission-debug/manifest.json
- PhoneSDK/docs/web-plugin/permission-debug.md