跪拜 Guibai
← Back to the summary

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.

captionless image

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:

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:

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:

This flexibility is useful but can also make the starting point confusing.

Here is a simple decision rule.

Use the Jetpack XR SDK when:

Use Unity, Godot, or Unreal Engine when:

Use OpenXR when:

Use WebXR when:

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:

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:

Tethered XR Glasses

These can deliver spatial and immersive experiences while connected to another computing device.

They may support:

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

For example, ARM-based Macs should use ARM-compatible images, not x86 images.

Emulator Setup

Inside Android Studio:

  1. Open the SDK Manager.
  2. Enable Show Package Details.
  3. Install the latest Android XR system image compatible with your machine.
  4. Open the Device Manager.
  5. Select the XR device category.
  6. Create an Android XR virtual device.
  7. Start the emulator.
  8. 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:

  1. Open an existing Compose application.
  2. Run it on the Android XR emulator.
  3. Observe how the application is displayed as a panel.
  4. Test resizing and interaction.
  5. Identify which parts of the experience could benefit from spatial separation.

At this stage, do not immediately add floating objects everywhere.

First ask:

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:

Full Space

Full Space allows your application to use the surrounding three-dimensional environment.

In Full Space, an application can:

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:

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:

The fundamentals codelab demonstrates how to add a Subspace and place existing Compose content inside spatial panels.

What to Learn Here

Focus on:

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:

This is the natural bridge between traditional Android UI development and XR development.

Your First Compose for XR Project Should Include:

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:

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:

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:

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:

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:

  1. Find where the application enters Full Space.
  2. Locate the Subspace.
  3. Identify each spatial panel.
  4. Find out how the orbiter is connected.
  5. Trace how the 3D model is loaded.
  6. Find out how its material and texture are changed.
  7. Examine how the animation state is managed.
  8. Change the model's position.
  9. Replace one asset.
  10. 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:

Learn Basic 3D Vocabulary

Android developers entering XR should understand:

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:

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:

These capabilities enable experiences like:

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

  1. Device pose
  2. Planes
  3. Anchors
  4. Depth
  5. Hand tracking
  6. Face tracking
  7. 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:

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:

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:

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:

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:

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:

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 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:

Build a simple adaptive Compose application.

Week 2: Android XR Orientation

Learn:

Run an existing application in the XR emulator.

Week 3: Fundamentals Part 1

Complete:

Rebuild the main exercise without copying the solution.

Week 4: Fundamentals Part 2

Learn:

Create one custom environment.

Week 5: Official Samples

Clone and modify the official XR samples.

Change:

Week 6: Perception

Build small experiments using:

Place each experiment in a separate module or project.

Week 7: Smart Glasses

Explore:

Build a small phone-and-glasses companion experience.

Week 8: Original Prototype

Build a complete project that solves a real problem.

Potential ideas:

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:

  1. Kotlin and Jetpack Compose
  2. Adaptive Android layouts
  3. Android XR device categories
  4. Immersive vs. augmented experiences
  5. Android XR emulator
  6. Home Space and Full Space
  7. Compose for XR
  8. Subspaces
  9. Spatial panels
  10. Spatial layouts and modifiers
  11. Orbiters
  12. Material Design for XR
  13. SceneCore
  14. 3D coordinate systems
  15. glTF and GLB assets
  16. Materials, textures, and animation
  17. Spatial environments
  18. Passthrough
  19. Device pose
  20. Planes and anchors
  21. Depth estimation
  22. Hand and face tracking
  23. Gaze, gestures, controllers, and voice
  24. Compose Glimmer
  25. Glasses projected experiences
  26. Speech recognition and text-to-speech
  27. AI and Gemini integration
  28. Performance and comfort
  29. Accessibility
  30. 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:

  1. Install the latest compatible Android Studio preview.
  2. Configure the Android XR emulator.
  3. Run an existing Compose application in Home Space.
  4. Complete Android XR Fundamentals Part 1.
  5. Complete Android XR Fundamentals Part 2.
  6. Clone the official Android XR samples.
  7. Replace its 3D model and modify its spatial layout.
  8. Build a project with panels, an orbiter, and a 3D entity.
  9. Add one ARCore perception capability.
  10. Explore Compose Glimmer and smart glasses.
  11. Add AI only where it improves the workflow.
  12. 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:

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!