projected-hardware — Claude Code skill: features and install
The projected-hardware Claude Code skill explains how Android apps access hardware on Android XR glasses. It covers camera and microphone permissions, device connections, and audio routing.
Apache-2.0 444 installs ★ 10,691 updated 2026-10-23
npx skills add android/skills --skill projected-hardware -a claude-codeWhat projected-hardware does
The skill explains how an Android app can access the camera and microphone on Android XR glasses. It covers requesting runtime permissions, capturing a photo through ProjectedContext, and managing the glasses’ connection to the host phone. The project needs compileSdk 36 or higher.
For audio capture, it describes routing AudioRecord to the glasses microphone over Bluetooth HFP. It also covers getting the phone’s context with ProjectedContext.createHostDeviceContext(activity), an API marked with @OptIn(ExperimentalProjectedApi::class). Hardware access lasts only while the glasses are connected to the host phone; ProjectedContext handles resource lifecycle management.
What it helps with
- request runtime camera and microphone permissions for glasses
- capture a photo with the glasses camera through
ProjectedContext - route
AudioRecordto the glasses microphone - manage resources as glasses connect to or disconnect from the phone
Example prompts for the agent
- Add photo capture from Android XR glasses using
ProjectedContextto my Android app. - Set up camera and microphone permissions for intelligent eyewear in my Android app.
- Route
AudioRecordto the glasses microphone over Bluetooth HFP.
How to install projected-hardware
1Skills CLI (Vercel)
npx skills add android/skills --skill projected-hardware -a claude-code2Manually: put the files in place
~/.claude/skills/projected-hardware/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/projected-hardware/
1Skills CLI (Vercel)
npx skills add android/skills --skill projected-hardware -a codex2Manually: put the files in place
.agents/skills/projected-hardware/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add android/skills --skill projected-hardware -a cursor2Manually: put the files in place
.cursor/skills/projected-hardware/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install android/skills xr/projected-hardware/SKILL.md2Manually: put the files in place
.github/skills/projected-hardware/SKILL.md1Skills CLI (Vercel)
npx skills add android/skills --skill projected-hardware -a gemini-cli2Platform CLI
gemini skills install https://github.com/android/skills --path xr/projected-hardwareManually: put the files in place
.devin/skills/projected-hardware/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add android/skills --skill projected-hardware -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about projected-hardware
How do I install projected-hardware in Claude Code?
Run npx skills add android/skills --skill projected-hardware -a claude-code. The skill file is at ~/.claude/skills/projected-hardware/SKILL.md.
What does projected-hardware do?
It guides Android app development for accessing Android XR glasses cameras and microphones, requesting runtime permissions, and managing connections with ProjectedContext.
What does projected-hardware require?
The project needs compileSdk 36 or higher. The glasses must be connected to the host phone for their hardware to be accessible.
Source text
SKILL.md · Apache-2.0
--- name: projected-hardware description: Provides instructions and workflows for accessing and managing hardware on Android XR projected devices, such as audio glasses and display glasses. Use this skill when building experiences for intelligent eyewear in an Android app and you need to access device hardware like the camera and microphone, handle glasses-specific runtime permissions, or manage connection lifecycles using projected context. license: Complete terms in LICENSE.txt metadata: author: Google LLC last-updated: '2026-11-13' keywords: - Android XR - intelligent eyewear - audio glasses - display glasses - glasses hardware - ProjectedContext - projected context - runtime permissions - CameraX - audio recording --- ## Prerequisites - You must use a `compileSdk` of 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](references/android/develop/xr/jetpack-xr-sdk/glasses/support-different-types.md) to understand how to get a projected context and [how to manage its lifecycle](references/android/develop/xr/jetpack-xr-sdk/glasses/check-availability.md). ## Request glasses hardware permissions - **Hardware permissions and opt-in** : You must read [Request hardware permissions](references/android/develop/xr/jetpack-xr-sdk/request-hardware-permissions.md) 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](references/android/develop/xr/jetpack-xr-sdk/access-hardware-projected-context.md) to understand the implementation patterns for capturing a photo with the glasses' camera using a `ProjectedContext`. - **Bluetooth HFP audio and host device context** : Read [Use a projected context to access hardware](references/android/develop/xr/jetpack-xr-sdk/access-hardware-projected-context.md) to route `AudioRecord` to the glasses microphone over Bluetooth HFP (`TYPE_BLUETOOTH_SCO`, `VOICE_COMMUNICATION`, `setPreferredDevice`, and `setCommunicationDevice`) and to obtain the host phone context from a projected activity using `ProjectedContext.createHostDeviceContext(activity)` (annotated with `@OptIn(ExperimentalProjectedApi::class)` from `androidx.xr.projected.experimental.ExperimentalProjectedApi`).
© Google LLC · Apache-2.0 · android/skills