projected-hardware
What it does
This skill explains how to access hardware such as the camera and microphone on projected smart glasses from an Android app. It covers glasses permissions and managing connections. It is for Android developers building intelligent eyewear features.
When to use it
- ✓When your app needs to take a photo with the camera on connected smart glasses.
- ✓When your app needs microphone access from projected glasses and must request permission.
- ✓When you need to handle the glasses connection and release resources when it drops.
Skill link
https://github.com/android/skills/blob/main/xr/projected-hardware/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Add a feature to my Android app that captures a photo from my connected smart glasses.”
5 new skills a week. 1 minute to read.
How it works
The skill points to the reference steps for projected contexts, permissions and camera capture. It explains how to check the glasses connection and manage the resources tied to it.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
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.
FAQ
What compile SDK is needed?
The project must use compileSdk 36 or higher.
Does the hardware work when the glasses are disconnected?
No. The hardware is only accessible while the glasses are connected to the phone.
How are permissions declared?
The camera and microphone permissions are declared in the Android manifest and requested at runtime.
Details
Original description by the author
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.
repo: android/skills
Popularity
- GitHub stars
- 10k
- Ranking position
- #11942
- License
- Apache-2.0
- Updated
- 10/29/2026
Comments
- …
More skills from this repository
agp-9-upgrade
10kHelps your agent upgrade an Android app to Android Gradle Plugin 9 and work through its breaking changes. Not for multiplatform projects.
camerax
10kHelps your agent build Android camera features with CameraX, including video recording, hardware controls, ML Kit and Media3 effects.
android-for-cars-parked-apps
10kHelps your agent adapt an Android video, game or browser app to run as a parked app on Android Auto and Android Automotive.
appfunctions
10kHelps your agent find key workflows in an Android app and expose them as AppFunctions that AI agents and voice commands can run.
Similar skills
android-clean-architecture
280kMakes your agent organize Android projects efficiently. It structures the code to make maintenance and new feature development easier.
compose-multiplatform-patterns
280kHelps your agent use Compose Multiplatform and Jetpack Compose patterns in KMP projects, covering state, navigation, theming, and performance.
dart-flutter-patterns
280kMakes your agent write code for Dart and Flutter apps. It uses modern patterns to create robust and manageable apps.