Create virtual AI glasses devices

Applicable XR devices
This guidance helps you build experiences for these types of XR devices.
AI Glasses

The Android XR Emulator is a specialized version of the Android Emulator that is designed for XR app development. It lets you test and debug your XR apps within the familiar environment of Android Studio.

Before you can run your app in the Android XR Emulator, you need to set it up. Create Android Virtual Devices (AVDs) for AI glasses to use with the Android XR Emulator as you test and debug your app. The emulator for AI glasses acts as a standalone, virtual device that you can pair with an emulator instance running a phone AVD.

Follow the steps in the following sections to set up everything you need for these virtual devices.

Check system requirements

Before you start creating Android Virtual Devices (AVDs) for AI glasses, review the following system requirements.

Create an Android Virtual Device for AI glasses

Follow these steps to create an AVD for AI glasses to use as you test and debug your app:

  1. Open the latest Canary build of Android Studio, and then click Tools > Device Manager > Add a new device > Create Virtual Device.

    The Device Manager panel in Android
Studio.

  2. In the Add Device window, in the Form Factor section, select XR.

  3. From the list, select AI Glasses, and then click Next.

  4. In the Configure Virtual Device tab in the Select system image section, select the most-recent AI Glasses system image that is compatible with your system from the list of system images.

    Android Studio "Configure virtual device"
window.

  5. Click Finish and click Yes if prompted to download the system image that you selected.

Create a phone AVD to act as the host device

AI glasses AVDs also require a phone AVD to act as the host device for your app. First, create a phone AVD to act as the host device for the AI glasses:

  1. In Android Studio, return to the Device Manager and click Add a new device > Create Virtual Device.
  2. In the Add Device window, in the Form Factor section, select Phone.
  3. Select any phone device (this example uses a Pixel 9 Pro), and then click Next.
  4. From the API drop-down menu, select API CANARY Preview.

    The AVD API level configuration for the phone host
device.

  5. In the Select system image section, select the most-recent system image that is compatible with your system from the list of system images:

    • Google Play ARM 64 v8a System Image (macOS)
    • Google Play Intel x86_64 Atom System Image (Windows and Linux)

    The AVD system image configuration for the phone host
device.

  6. Click Finish.

Pair the devices

Finally, pair the devices:

  1. In the Device Manager, find the AI glasses AVD and select Pair Glasses from the overflow menu.

    The Pair Glasses option in the Device Manager launches the Pairing
Assistant.

  2. Select the phone AVD from the list of compatible devices.

    The list of compatible host devices that can be
paired.

    The Pairing Assistant launches both AVDs in the emulator and initiates pairing.

    The Pairing Assistant uses the phone AVD to present association
requests.

  3. On the phone AVD, accept both requests to associate the devices.

    The Pairing Assistant completes pairing.

    The Pairing Assistant completes pairing after the association requests are
accepted.

Next steps

Now that you've created your AVDs for AI glasses, run your app on the AVDs using the emulator.


OpenXR™ and the OpenXR logo are trademarks owned by The Khronos Group Inc. and are registered as a trademark in China, the European Union, Japan and the United Kingdom.