Android XR Isn't a New Platform — It's a Compose Extension You Already Know
This article is translated from 'The Complete Guide to Getting Started with Android XR Development', original link https://medium.com/proandroiddev/the-complete-guide-to-getting-started-with-android-xr-development-65bb057ec1b1, published by Akshay Nandwana on July 21, 2026.
A practical roadmap for Android developers — from your first emulator to spatial UI, 3D content, perception, and smart glasses.
Android development is no longer confined to the rectangular screen in your hand.
With Android XR, developers can build applications that span spatial panels, immersive environments, XR headsets, tethered glasses, audio glasses, and display glasses. Existing Android apps can continue to run with traditional 2D interfaces, while developers can gradually introduce spatial layouts, 3D objects, real-world perception, and hands-free interaction.
Importantly:
You don't need to be a game developer to start building Android XR applications.
If you already know Kotlin, Jetpack Compose, Android Studio, lifecycle management, and adaptive layouts, you already have most of the foundational knowledge required.
This guide explains what Android XR is, which tools you should choose, which concepts you should learn, and in what order.
What Exactly is Android XR?
Android XR is an extension of the Android platform, designed for the growing range of extended reality devices.
These devices currently fall into two broad experience categories:
Immersive Experiences
These experiences are primarily targeted at XR headsets and tethered XR glasses.
Immersive applications can:
- Bring users into fully virtual environments
- Blend digital content with the physical world
- Place multiple application panels around the user
- Render interactive 3D objects
- Recognize surfaces, depth, hands, faces, anchors, and device position
- Switch between traditional multitasking and fully spatial experiences
Augmented Experiences
These experiences are designed for devices like audio glasses and display glasses.
Augmented experiences do not replace the user's surroundings but add lightweight information and assistance to everyday activities.
Examples include:
- Real-time navigation
- Translation
- Notifications
- Voice assistants
- Contextual information
- Field worker checklists
- Navigation instructions
- Camera-assisted AI
- Hands-free communication
Android XR supports both categories of experience, but they involve different design constraints, device capabilities, and development libraries.
Android XR Development Paths
One of the first decisions you need to make is which development path is right for your application.
Android XR supports several familiar technologies:
- Jetpack XR SDK
- Kotlin and Jetpack Compose
- Android Views
- Unity
- Godot
- Unreal Engine
- OpenXR
- WebXR
This flexibility is useful but can also make the starting point confusing.
Here is a simple decision rule.
Use the Jetpack XR SDK when:
- You are already an Android developer
- You are extending an existing mobile or large-screen application
- Your application is primarily UI-driven
- You want to use Kotlin, Compose, Android architecture, and Jetpack
- You need spatial panels, 3D models, environments, or Android integration
- You are building a companion experience for smart glasses
Use Unity, Godot, or Unreal Engine when:
- Your application is primarily a game
- You need complex real-time 3D rendering
- Your team already has an engine-based XR project
- You need advanced physics, animation, shaders, or game engine workflows
Use OpenXR when:
- You need a lower-level, cross-platform XR standard
- You want finer control over rendering and device capabilities
- You are building an engine, framework, or deeply immersive application
Use WebXR when:
- You are building browser-based experiences
- You want users to enter XR via a web page
- Your team is more familiar with web technologies than native Android
For most existing Android developers, the Jetpack XR SDK is the best first path. Android officially supports bringing existing mobile and large-screen applications into XR by spatializing familiar layouts and gradually adding immersive features.
Phase 1: Strengthen Your Android Fundamentals
Before touching XR-specific APIs, ensure you are familiar with the following Android concepts:
- Kotlin
- Coroutines and Flow
- Jetpack Compose
- State management
- Android Lifecycle
- ViewModel
- Material Design
- Adaptive layouts
- Navigation
- Permissions
- Media and Camera APIs
- Android Virtual Devices
You don't need to master every Android API.
However, Jetpack Compose is particularly important because the official Android XR fundamentals codelabs are based on Compose. Google recommends having experience with Kotlin, Compose, Android Studio, and virtual devices before starting.
Developers who can already create a Compose application, manage UI state, and run it on an emulator are ready to begin.
Phase 2: Understand Android XR Device Categories
Do not think of "XR" as a single device type.
Android XR supports:
XR Headsets
These offer a wide field of view and can create fully immersive virtual environments.
Typical inputs include:
- Hand tracking
- Eye tracking
- Motion controllers
- Gaze
- Voice
- Mouse and keyboard
Tethered XR Glasses
These can deliver spatial and immersive experiences while connected to another computing device.
They may support:
- Spatial UI
- Passthrough
- Real-world anchoring
- Hand and eye input
- High-quality visual content
Audio Glasses
These may have no visual display. The experience is driven by sound, voice, sensors, notifications, and AI assistance.
Display Glasses
These provide lightweight visual information within the user's real-world view.
Their interface must be minimal, readable, glanceable, and comfortable. Android provides Jetpack Compose Glimmer, a Compose-based toolkit specifically optimized for display glasses experiences.
This device distinction matters because an interface designed for a headset should not simply be copied onto display glasses.
Phase 3: Set Up Android Studio and the Android XR Emulator
You do not need physical XR hardware to start experimenting with native Android XR applications.
Android's current tools allow you to build and test many interactions through Android Studio and the Android XR emulator. The Android XR SDK is currently available as a developer preview, so you should expect APIs and setup requirements to evolve. As of July 2026, the official documentation identifies Developer Preview 4 as the current SDK preview.
What You Need
- The latest supported Android Studio preview or Canary build
- A machine capable of running the XR emulator
- A suitable Android XR system image
- An emulator architecture matching your computer
For example, ARM-based Macs should use ARM-compatible images, not x86 images.
Emulator Setup
Inside Android Studio:
- Open the SDK Manager.
- Enable Show Package Details.
- Install the latest Android XR system image compatible with your machine.
- Open the Device Manager.
- Select the XR device category.
- Create an Android XR virtual device.
- Start the emulator.
- Run a basic Android application on it before introducing XR-specific code.
The official fundamentals codelab demonstrates this setup and recommends confirming that a basic application runs in the emulator before spatializing it.
Important Note
The exact Android Studio version, system image name, SDK level, and Jetpack XR dependency versions can change during the preview period.
Use the versions shown in the latest official documentation, not old alpha version numbers copied from articles or older sample projects.
Phase 4: Run a Plain Android App in XR
A useful feature of Android XR is that you don't always need to rebuild an application from scratch.
Most existing Android mobile and large-screen applications can be displayed as 2D panels inside XR headsets and tethered XR glasses. Well-designed adaptive large-screen applications provide a particularly good starting point.
Therefore, your first experiment should be simple:
- Open an existing Compose application.
- Run it on the Android XR emulator.
- Observe how the application is displayed as a panel.
- Test resizing and interaction.
- Identify which parts of the experience could benefit from spatial separation.
At this stage, do not immediately add floating objects everywhere.
First ask:
- Does the application work correctly as a normal panel?
- Is the interface adaptive?
- Are buttons large enough to target comfortably?
- Is the text still readable?
- Does the user need to move their head excessively?
- Would spatialization make the task easier, or just more impressive?
Strong XR applications often start as useful Android applications.
Phase 5: Learn Home Space and Full Space
The first major concept in Android XR is Space.
Android XR applications can run in two main modes.
Home Space
Home Space is the multitasking environment.
Multiple applications can coexist, similar to windows on a desktop or large-screen device. Regular Android applications can run here without XR-specific changes.
Home Space is suitable when:
- The user is multitasking
- The experience is primarily 2D
- The application should not take over the environment
- The user may need other applications simultaneously
Full Space
Full Space allows your application to use the surrounding three-dimensional environment.
In Full Space, an application can:
- Create multiple spatial panels
- Add 3D models
- Control spatial layout
- Introduce depth
- Display immersive environments
- Blend virtual and physical environments
The transition between Home Space and Full Space should be intentional.
For example, a video application might remain in Home Space while the user browses content, then enter Full Space when the user starts an immersive viewing session.
The first Android XR fundamentals codelab introduces both spaces and demonstrates how an application can start in Home Space and offer a richer experience in Full Space.
Phase 6: Learn Spatial Panels and Subspaces
Spatial panels are one of the fundamental building blocks of an Android XR interface.
Think of a spatial panel as an Android UI surface placed within three-dimensional space.
Instead of placing every component in a single flat screen, you can divide your application content into meaningful panels.
For example, a productivity application might use:
- A main work panel
- A tools panel
- A contextual information panel
- A communication panel
In Jetpack Compose for XR, you will also encounter the concept of a Subspace.
A Subspace represents a portion of three-dimensional space where you can:
- Create spatial layouts
- Add spatial panels
- Position 3D content
- Introduce depth
- Organize immersive elements
The fundamentals codelab demonstrates how to add a Subspace and place existing Compose content inside spatial panels.
What to Learn Here
Focus on:
Subspace- Spatial panels
- Spatial layout modifiers
- Panel dimensions
- 3D spatial positioning
- Moving and resizing panels
- Home Space and Full Space transitions
- XR capability checks
Do not try to master perception, anchoring, and 3D rendering before understanding spatial UI.
Phase 7: Learn Jetpack Compose for XR
Jetpack Compose for XR extends familiar declarative UI concepts into three-dimensional space.
It provides:
- XR-aware Compose components
- Spatial layouts
- Spatial panels
- Automatic layout behaviors
- Preset arrangements
- Interaction recommendations
- Support for combining 2D UI and spatial content
This is the natural bridge between traditional Android UI development and XR development.
Your First Compose for XR Project Should Include:
- An existing Compose screen
- A button to transition to Full Space
- Two spatial panels
- An orbiter
- One 3D object
- A way to return to Home Space
This project is intentionally small, but it gives you an understanding of the main XR application model.
Phase 8: Complete the Two Android XR Fundamentals Codelabs
The official fundamentals codelabs provide one of the clearest starting paths.
Fundamentals Part 1: Spaces and Spatial Panels
Part 1 teaches:
- Home Space
- Full Space
- Building XR dependencies
- Subspaces
- Spatial panels
- Spatial layouts
- Running and testing in the XR emulator
- Adapting an existing Compose application
This codelab starts from a basic single-screen application and gradually transforms it into a more spatial experience.
Fundamentals Part 2: Orbiters and Spatial Environments
Part 2 continues from the first project and introduces:
- Orbiters
- Floating controls
- Spatial environments
- Environment assets
- Skyboxes
- glTF and GLB content
- SceneCore
- Environment preferences
- Blending virtual content with passthrough
An orbiter places related controls around a spatial panel without consuming the panel's main content area.
A spatial environment changes the world around the user. It might include:
- A panoramic skybox
- 3D foreground or background geometry
- Image-based lighting
- Controlling passthrough opacity
The second codelab also demonstrates an important architectural principle: applications express a preferred environment through a Scene, rather than directly owning the full system environment.
Complete both codelabs in order. Part 2 assumes you already understand the concepts introduced in Part 1.
Phase 9: Explore the Official Android XR Sample Projects
After completing the codelabs, clone the official samples repository:
git clone https://github.com/android/xr-samples.git
The repository's Hello Android XR sample demonstrates several core features:
- Spatial panels
- Orbiters
- Spatial environments
- 3D object rendering
- Material overrides
- Texture overrides
- Object animation
- Changing a 3D object's position
The project can be imported directly into Android Studio. Currently, its documentation recommends using the latest compatible Canary version of Android Studio and updating the XR emulator image before running.
Don't just run the sample.
Study it using this sequence:
- Find where the application enters Full Space.
- Locate the Subspace.
- Identify each spatial panel.
- Find out how the orbiter is connected.
- Trace how the 3D model is loaded.
- Find out how its material and texture are changed.
- Examine how the animation state is managed.
- Change the model's position.
- Replace one asset.
- Remove one feature and rebuild it yourself.
Samples become useful when you modify them, not just when you compile them.
Phase 10: Learn SceneCore and 3D Content
Once you are comfortable with spatial Compose layouts, move on to Jetpack SceneCore.
SceneCore provides lower-level building blocks for immersive content, including spatial entities and environment-related APIs.
Topics to learn include:
- Spatial entities
- Entity hierarchies
- Transformations
- Position
- Rotation
- Scale
- 3D model loading
- Materials
- Textures
- Animation
- Spatial environments
- Passthrough
- Scene capabilities
- Lifecycle management
Learn Basic 3D Vocabulary
Android developers entering XR should understand:
- X, Y, Z axes
- Translation
- Rotation
- Scale
- Local and world coordinates
- Meshes
- Materials
- Textures
- Lighting
- Camera pose
- Field of view
- Bounding boxes
- Anchors
- Rays
- Hit testing
You don't need to become a professional 3D artist, but these concepts will help you reason about spatial behavior.
Asset Formats
Android XR workflows commonly use:
- glTF for 3D scenes and models
- GLB as the binary form of glTF
- EXR for high dynamic range environment images
- Image-based lighting assets for realistic illumination
Tools like Blender, Maya, and Spline can be used to create or export compatible assets.
Phase 11: Learn ARCore for Jetpack XR
After you can render and position content, the next step is to help your application understand the physical world.
ARCore for Jetpack XR provides perception capabilities such as:
- Plane detection
- Anchors
- Hand tracking
- Face tracking
- Depth estimation
- Device pose
- Semantic understanding
These capabilities enable experiences like:
- Placing virtual objects on a real table
- Keeping objects fixed as the user moves
- Understanding nearby surfaces
- Building hand-driven interfaces
- Blending digital content with the physical environment
The Android XR SDK documentation organizes these perception topics as a distinct learning area, which is a useful signal: learn spatial UI and scene building before perception APIs.
Recommended Perception Learning Order
- Device pose
- Planes
- Anchors
- Depth
- Hand tracking
- Face tracking
- Semantic or geospatial capabilities
Build one focused experiment for each capability, rather than adding all of them to a single application.
Phase 12: Understand XR Input
Users interact with XR applications differently than they interact with a phone.
Possible input methods include:
- Gaze
- Pinch gestures
- Hand tracking
- Motion controllers
- Voice
- Mouse
- Keyboard
- Touchpads on glasses
- Head movement
- Physical device buttons
OpenXR support on Android XR includes hand interaction, eye gaze interaction, 6DoF motion controllers, and mouse interaction for immersive applications.
Design for Multiple Inputs
Do not assume every user will use their hands.
For every important action, consider:
- Can it be reached by gaze?
- Can it be performed by a controller?
- Is there a voice alternative?
- Is it accessible to keyboard users?
- Does the target provide clear hover or focus feedback?
- Can the user recover from an accidental selection?
Input flexibility is part of accessibility, not just device compatibility.
Phase 13: Learn XR Design Principles
Spatial interfaces are not mobile interfaces floating in the air.
Good XR design should consider:
Comfort
Avoid forcing users to repeatedly turn their head, reach too far, or focus on content at uncomfortable distances.
Readability
Text must remain readable across different backgrounds, depths, display technologies, and lighting conditions.
Restraint
Not every button needs to float. Not every screen needs to be a 3D environment.
Depth
Depth should convey hierarchy or context, not create visual noise.
Safety
Users should maintain awareness of their surroundings when appropriate.
Predictability
Panels and controls should appear where users expect them to stay.
Accessibility
Support multiple input methods, readable typography, clear focus states, captions, audio alternatives, and simplified motion requirements.
Android provides separate design guidelines for immersive XR experiences and augmented glasses experiences because their interaction models differ significantly.
Phase 14: Explore Audio and Display Glasses
After learning the headset-oriented XR fundamentals, study smart glasses.
Android's projected experience stack allows existing mobile applications to provide complementary experiences on audio and display glasses.
Relevant topics include:
- Device availability
- Device lifecycle
- Projected activities
- Audio input
- Automatic speech recognition
- Text-to-speech
- Notifications
- Hardware permissions
- Projected contexts
- Gemini Live integration
- Jetpack Compose Glimmer
The latest Android XR updates also introduce a device availability API that works with standard Android lifecycle states, allowing applications to respond when supported glasses are available or being worn.
Jetpack Compose Glimmer
Compose Glimmer is designed specifically for minimal, comfortable display glasses user interfaces.
Its component set includes concepts like:
- Buttons
- Cards
- Lists
- Icons
- Surfaces
- Text
- Toggle buttons
- Title chips
- Vertical stacks
- Focus handling
- Indirect pointer input
The goal is not to recreate a full phone application on glasses.
The phone application should handle complex interactions, while the glasses experience provides minimal, useful contextual information.
Phase 15: Add AI Only After Interactions Work
XR and AI are a powerful combination, but AI should not be the first dependency you introduce.
First, ensure the experience works with deterministic interactions.
Then consider adding:
- Voice agents
- Real-time translation
- Scene understanding
- Object explanation
- Contextual help
- Hands-free workflows
- Meeting summarization
- Accessibility assistance
- Guided learning
- Spatial search
- Gemini Live interactions
The Jetpack XR documentation includes dedicated guides for adding Gemini-powered AI experiences, while the glasses documentation covers speech recognition, text-to-speech, and real-time AI integration.
A useful rule is:
XR determines where and how the experience appears. AI determines how intelligently it responds.
Don't let the AI layer compensate for a confusing spatial interface.
Phase 16: Test Performance, Comfort, and Failure States
Performance issues in XR don't just cause a slow interface. They affect user comfort.
Pay attention to:
- Frame rate
- CPU usage
- GPU usage
- Thermal behavior
- Memory consumption
- Asset size
- Texture resolution
- Model complexity
- Animation cost
- Startup time
- Input latency
- Network latency
- Audio latency
OpenXR support on Android XR exposes performance-related features such as eye tracking, space warp, frame timing, GPU utilization, CPU frequency, and frames-per-second metrics.
Test Failure States
Your application should behave safely when:
- XR features are unavailable
- The application cannot enter Full Space
- Asset loading fails
- Hand tracking is unavailable
- Permissions are denied
- Glasses disconnect
- Network connectivity drops
- Speech recognition fails
- The application returns to the background
- The user moves outside the tracking area
XR capability detection should be part of your application's architecture, not an afterthought.
Recommended Eight-Week Android XR Roadmap
Week 1: Android and Compose Readiness
Learn or refresh:
- Kotlin
- Compose
- State
- ViewModel
- Coroutines
- Adaptive layouts
- Android Studio emulator workflow
Build a simple adaptive Compose application.
Week 2: Android XR Orientation
Learn:
- Device categories
- Immersive vs. augmented experiences
- Home Space
- Full Space
- Android XR tool selection
Run an existing application in the XR emulator.
Week 3: Fundamentals Part 1
Complete:
- Emulator setup
- Setting up Compose for XR dependencies
- Subspaces
- Spatial panels
- Full Space transitions
Rebuild the main exercise without copying the solution.
Week 4: Fundamentals Part 2
Learn:
- Orbiters
- Spatial environments
- SceneCore
- GLB and environment assets
- Passthrough blending
Create one custom environment.
Week 5: Official Samples
Clone and modify the official XR samples.
Change:
- 1 3D model
- 1 material
- 1 texture
- 1 animation
- 1 spatial position
Week 6: Perception
Build small experiments using:
- Planes
- Anchors
- Device pose
- Hand tracking
Place each experiment in a separate module or project.
Week 7: Smart Glasses
Explore:
- Projected experiences
- Device availability
- Compose Glimmer
- Voice input
- Text-to-speech
- Notifications
Build a small phone-and-glasses companion experience.
Week 8: Original Prototype
Build a complete project that solves a real problem.
Potential ideas:
- A spatial code review room
- A guided device repair assistant
- A hands-free warehouse checklist
- An immersive learning application
- A spatial media dashboard
- A real-time translation companion
- An accessibility assistant
- A 3D product exploration application
- A spatial remote support experience
The goal should be a useful workflow, not a collection of disconnected XR effects.
Topics You Should Learn in Order
Here is the complete Android XR learning sequence:
- Kotlin and Jetpack Compose
- Adaptive Android layouts
- Android XR device categories
- Immersive vs. augmented experiences
- Android XR emulator
- Home Space and Full Space
- Compose for XR
- Subspaces
- Spatial panels
- Spatial layouts and modifiers
- Orbiters
- Material Design for XR
- SceneCore
- 3D coordinate systems
- glTF and GLB assets
- Materials, textures, and animation
- Spatial environments
- Passthrough
- Device pose
- Planes and anchors
- Depth estimation
- Hand and face tracking
- Gaze, gestures, controllers, and voice
- Compose Glimmer
- Glasses projected experiences
- Speech recognition and text-to-speech
- AI and Gemini integration
- Performance and comfort
- Accessibility
- Packaging, quality, and distribution
You don't need to learn all 30 topics before building something.
The learning sequence should alternate between theory and small projects.
Common Mistakes Android Developers Make When Starting XR
Mistake 1: Starting with a large immersive application
Build one spatial interaction first.
Mistake 2: Treating XR as a larger phone screen
Spatial computing introduces depth, position, environment, gaze, motion, and new input models.
Mistake 3: Adding unnecessary 3D elements
3D components should make the experience easier to understand or use.
Mistake 4: Ignoring Home Space
Not every task deserves Full Space.
Mistake 5: Assuming physical hardware is required
The Android XR emulator is sufficient for learning many native concepts and testing early prototypes.
Mistake 6: Hardcoding preview dependency versions from tutorials
Always check the latest official documentation, as the SDK is still under active development.
Mistake 7: Ignoring existing Android architecture
XR applications still need proper state management, lifecycle handling, testing, networking, accessibility, and error recovery.
Mistake 8: Building for only one input method
Support multiple suitable interaction methods.
Mistake 9: Adding AI before validating the experience
Start with a clear user workflow, then add intelligence.
Mistake 10: Running samples without modifying them
Change the code until you understand how it works.
The Fastest Path for Existing Android Developers
Here is the streamlined route:
- Install the latest compatible Android Studio preview.
- Configure the Android XR emulator.
- Run an existing Compose application in Home Space.
- Complete Android XR Fundamentals Part 1.
- Complete Android XR Fundamentals Part 2.
- Clone the official Android XR samples.
- Replace its 3D model and modify its spatial layout.
- Build a project with panels, an orbiter, and a 3D entity.
- Add one ARCore perception capability.
- Explore Compose Glimmer and smart glasses.
- Add AI only where it improves the workflow.
- Test comfort, accessibility, performance, and fallback behavior.
Final Thoughts
Android XR might look like an entirely new development world, but its entry point is deliberately familiar.
Android Studio is still your IDE.
Kotlin is still your language.
Jetpack still provides the foundation for your application.
Compose still defines your interface.
The difference is that your application is no longer confined to a single physical screen.
The best way to start is not to build a virtual universe. Start by taking a useful Android workflow and asking:
- Which information should stay on a normal panel?
- Which content benefits from depth?
- Which controls should remain nearby?
- When should the experience enter Full Space?
- What can the user accomplish with hands, gaze, or voice?
- Can the application provide value through lightweight glasses?
Build one spatial panel.
Then add one orbiter.
Then load one 3D object.
Then understand one real-world surface.
This process teaches far more than trying to build a complete XR platform on the first weekend.
Android XR is still evolving, which makes this a particularly valuable time to explore it. The platform is new enough that developers can help shape its patterns, but also familiar enough that experienced Android developers can start building without abandoning the ecosystem they already know.
The next generation of Android applications may not live inside a screen. But they can still start inside Android Studio.
Welcome to search and follow the public account 「稀有猿诉」 for more high-quality articles!
Protect originality, do not reprint!