Develop
Develop
Select your platform

Build and Run hello_xr Sample App

The OpenXR™ Software Development Kit (SDK) Sources Project includes the hello_xr sample app. This app demonstrates basic OpenXR functionality on devices that support OpenXR.
This topic describes how to build and run the hello_xr app on Meta Quest devices.

Prerequisites

Before getting started, review the System and Hardware Requirements, and set up your device and environment by following these guides:

Download and Store SDKs

Follow these steps:
  1. Download the latest Oculus OpenXR Mobile SDK package and extract it on your hard drive, for example C:\<path_to_Oculus_SDK_folder>\OpenXRMobileSDK\.
  2. Clone or download the OpenXR™ Software Development Kit (SDK) Sources Project and extract it on your computer, for example C:\<path_to_core_OpenXR_SDK_folder>\OpenXR-SDK-Source-main\.
The hello_xr sample project is located in the src tests hello_xr folder: C:\<path_to_core_OpenXR_SDK_folder>\OpenXR-SDK-Source-main\src\tests\hello_xr.

Open hello_xr Project

  1. In Android Studio, select Open.
  2. Navigate to the hello_xr folder, for example in C:\<path_to_core_OpenXR_SDK_folder>\OpenXR-SDK-Source-main\src\tests\hello_xr.
    Open hello_xr Project
  3. Click OK.

Build The OpenXR SDK

  • Follow the steps in the C:\<path_to_core_OpenXR_SDK_folder>\OpenXR-SDK-Source-main\BUILDING.md to configure and compile the SDK.

Run App

If the run icon is not visible in Android Studio, select Sync Project with Gradle Files.
Run hello_xr Project
When the app loads, you see a few colored cubes in VR. One cube is locked at the center of your viewport and pinned to the headset’s pose. Two other cubes are attached to the left or right controller. You can adjust the size of these two cubes by squeezing the Grip Buttons.
Did you find this page helpful?