Skip to main content

Overview

The Spectacles camera captures information about hands, faces, and surroundings, enabling interaction with AR content in the environment. The microphone uses information about voice, facilitating features like recorded videos and voice commands. Both camera and microphone access are essential for the device to function properly. Additionally, Spectacles can use location data to support location-based Lenses and features.

As a developer, you may use components that involve sensitive user data. For instance, Hand Tracking enables pinch gestures for interaction, and Voice ML lets users interact with experiences via voice commands.

When using capabilities or components involving sensitive user data, Lens Studio automatically declares the necessary permissions in the project. While some Lenses are designed for solo use, others require communication with external devices, such as Connected Lenses or RemoteServiceModule, which interact with the internet. During such interactions, Spectacles prevent simultaneous use of these capabilities with sensitive user data to ensure privacy. These APIs are tagged as “Exposes User Data” on the API page.

To discover what permissions have been declared in your project, go to the Spectacles section inside your Project Settings.

Using Non-Declared Permissions Features

In some cases, you might use capabilities that require permission declarations dynamically through scripts.

For example, when you dynamically instantiate a HeadComponent through script:

let headComponent = script.getSceneObject().createComponent('Component.Head');
let headLandMarks = headComponent.getLandmarks();
require('LensStudio:FaceTrackingModule');
let headComponent = script.getSceneObject().createComponent('Component.Head');
let headLandMarks = headComponent.getLandmarks();

In this case, Lens Studio does not automatically declare the permission compared to attaching a HeadComponent to a SceneObject in the Scene Hierarchy Panel. Lenses that attempt to use features without declaring the permissions in their Lens Project will automatically get a permission denied by the SnapOS system.

To learn more about the types of permissions Lenses can use, review the List of Permissions Types section.

List of Permissions Types

Permission TypeAssets & APIs Requesting Permission
Colocated Connected LensesConnectedLensModule
Remote Connected LensesConnectedLensModule
Speech to TextVoiceMLModule
DialogModule
Text to SpeechTextToSpeechModule
Remote APIsRemoteServiceModule
RemoteMediaModule
BitmojiBitmojiModule
Camera - SnapMLCameraTextureProvider
CameraModule
Microphone - SnapMLMicrophoneAudioProvider
VoiceMLModule
DialogModule
GPS - PreciseRawLocationModule
Location - CoarseProcessedLocationModule
FaceFaceRenderObjectProvider (Mesh)
HeadComponent (Landmarks)
FaceTrackingModule
Foundational TrackersDeviceTracking
DeviceTrackingModule
Supplementary TrackersSegmentationTextureProvider
ObjectTrackingAsset
MarkerTrackingAsset
DepthTextureProvider
TrackedPoint
Point
Cloud World Mesh
Body TrackersObject3DAsset
InternetRemoteServiceModule
Was this page helpful?
Yes
No

AI-Powered Search