display-glasses-with-jetpack-compose-glimmer

Build projected Android XR apps for display glasses using Jetpack Compose Glimmer.

3|Updated Aug 4, 2024
One-click install
npx skills add https://github.com/kabindra-shrestha/Clean-Architecture-Kotlin-Compose-Multiplatform --skill display-glasses-with-jetpack-compose-glimmer-kabindra-shrestha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: display-glasses-with-jetpack-compose-glimmer
Source: https://github.com/kabindra-shrestha/Clean-Architecture-Kotlin-Compose-Multiplatform/tree/main/.agents/skills/xr/display-glasses-with-jetpack-compose-glimmer
Command: npx skills add https://github.com/kabindra-shrestha/Clean-Architecture-Kotlin-Compose-Multiplatform --skill display-glasses-with-jetpack-compose-glimmer-kabindra-shrestha

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires androidx.xr.glimmer:glimmer, androidx.xr.glimmer:glimmer-google-fonts, and includes references (resource) components.

What problem does it solve? Building UI for display glasses requires a specialized design system: additive displays render black as transparent, Material components resolve to invisible colors, and input is limited to one-dimensional touchpad gestures. This Skill provides the guidelines, theming tokens, and component APIs needed to build legible, glanceable Android XR apps for intelligent eyewear. ## Core Features & Use Cases - Glimmer Design System Guidance: Apply GlimmerTheme, Google Sans Flex typography, depth effect levels, and additive-display color rules instead of Material components. - Component Implementation: Build Cards, Buttons, Title Chips, Icons, Lists, Stacks, Text, and Surfaces using the androidx.xr.glimmer API with source code and samples as reference. - Projected Activity Setup: Configure a Projected Activity with xr_projected display category, launch it from a mobile app via ProjectedContext, and handle hardware capabilities and permissions. - Use Case: Add a "Launch on Glasses" button to an existing Android app that projects a Glimmer-based card UI to connected display glasses, with bottom-aligned content, black background, and touchpad focus navigation. ## Quick Start Use the display-glasses-with-jetpack-compose-glimmer skill to create a Glimmer-based projected activity that shows a card list on connected display glasses.

Frequently Asked Questions about display-glasses-with-jetpack-compose-glimmer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an Android XR app for display glasses with Jetpack Compose?

Create a Projected Activity with android:requiredDisplayCategory set to xr_projected, add the androidx.xr.glimmer:glimmer dependency, and wrap all UI in GlimmerTheme. Build the interface with Glimmer components like Card, List, and Button instead of Material components.

Why can't I use MaterialTheme or Material components on display glasses?

Display glasses use additive displays where black renders as fully transparent, so Material Text resolves to dark foreground tokens that appear invisible. Glimmer components automatically manage theme colors for transparent displays, so you must use GlimmerTheme and Glimmer Text instead.

What is the minimum text size for display glasses UI?

The absolute minimum readable text size is 18sp, equivalent to 0.6 degrees of visual angle at 1 meter. Anything smaller fails legibility checks, and thin or hairline font weights should be avoided because they cause shimmering on additive AR lenses.

How do I launch a glasses activity from my existing Android app?

Add a highly visible button labeled Launch on Glasses that uses ProjectedContext to start the Glasses Activity on the connected eyewear. Disable the button when no glasses are connected, and never launch the Glasses Activity on the phone itself.

What are the limitations of Jetpack Compose Glimmer?

Standard Material 3 shadow and elevation modifiers are unsupported; you must use ShadowScope or DepthEffect tokens. Inputs are one-dimensional via the touchpad, nested scrolling should be avoided, and specific hardware device capabilities are not detailed.