Projected Hardware
Android (Google)OfficialCreated by Google LLCDistributed by Android (Google)
- Skill
- Tool integration
- Software development
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides the necessary patterns for Android developers to interact with hardware components on connected XR devices, such as audio and display glasses. It focuses on the use of ProjectedContext to manage device lifecycles, handle hardware-specific permissions, and ensure stable connections between the host phone and the wearable hardware.
What it does
- Explains how to obtain and use a ProjectedContext for hardware access.
- Provides patterns for monitoring connection states between the host phone and XR glasses.
- Outlines the requirements for declaring and requesting runtime permissions for glasses hardware.
- Details how to manage resource lifecycles based on device availability and connection status.
- Offers guidance on integrating with system services like CameraManager for glasses-specific hardware.
When to use it
- When developing Android applications that need to access cameras or microphones on connected XR eyewear.
- When you need to implement robust connection monitoring to handle device disconnects or removal.
- When you need to manage runtime permissions specifically for projected XR hardware.
- When your app needs to distinguish between phone-based hardware and connected glasses-based hardware.
Advantages
- Ensures stable hardware interaction by leveraging the official ProjectedContext lifecycle management.
- Provides clear patterns for handling the dynamic nature of wearable device connectivity.
- Helps developers correctly implement Android runtime permissions for XR-specific hardware.
Usage examples
- “How do I access the camera on connected audio glasses in my Android app?”
- The skill provides the implementation pattern using ProjectedContext to initialize system services like CameraManager specifically for the connected glasses.
- “How can I tell if the user is currently wearing their display glasses?”
- The skill explains how to use the XR Device Availability API to monitor Lifecycle.State and determine if the device is active, inactive, or disconnected.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/android/projected-hardware/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip projected-hardware.zip -d .agents/skills
Documentation by Google LLC
Prerequisites
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.
Files
- ATTRIBUTION.mdAdded by AutoGineer957 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md2.0 KiB
- references/android/develop/xr/jetpack-xr-sdk/access-hardware-projected-context.md25.9 KiB
- references/android/develop/xr/jetpack-xr-sdk/glasses/check-availability.md4.7 KiB
- references/android/develop/xr/jetpack-xr-sdk/glasses/support-different-types.md8.3 KiB
- references/android/develop/xr/jetpack-xr-sdk/request-hardware-permissions.md9.1 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- Google LLC
- Publisher
- Android (Google) (Official)
- Distributed by
- Android (Google)
- Source
- android/skills · xr/projected-hardware · commit bf68e2d
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE.txt)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Google LLC or Android (Google).
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download projected-hardware.zip