About projected-hardware
Guidance for Android developers building apps that access intelligent eyewear hardware. It covers projected-context lifecycle management, permissions, and camera capture.
Key features
- 01Manage connection and resource lifecycles
- 02Configure runtime hardware permissions
- 03Capture eyewear camera images with CameraX
Use cases
- 01Add eyewear camera access to an Android app
- 02Manage hardware resources while glasses are connected
- 03Request camera and microphone permissions
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ android/ skills --skill projected-hardwareAfter installing, type/projected-hardwarein Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/android/develop/xr/jetpack-xr-sdk/access-hardware-projected-context.mdrequest-hardware-permissions.mdreferences/android/develop/xr/jetpack-xr-sdk/glasses/check-availability.mdsupport-different-types.mdDetails
From the project READMEPrerequisites
- You must use a
compileSdkof 36 or higher.
Connection and lifecycle management
Intelligent eyewear hardware is only accessible while the glasses are connected
to the host phone. Monitor connection state and manage resource lifecycles using
ProjectedContext. You must read
Understand projected activities and projected contexts to understand
how to get a projected context and how to manage its lifecycle.
Request glasses hardware permissions
- Hardware permissions and opt-in : You must read Request hardware permissions to understand how to declare camera and microphone runtime permissions in the Android Manifest file, request runtime permissions in different scenarios, and handle permission results.
Glasses hardware access and capabilities
- Camera capture and CameraX : You must read Capture an image with the glasses' camera to understand the implementation patterns for capturing a photo with the glasses' camera using a
ProjectedContext.
Comments
Markdown supported