Oculus VR Client (Android)¶
The NVIDIA CloudXR SDK includes a sample Oculus VR client that is designed to work with VR headsets that support the Oculus VR SDK. The client decodes and renders content that is streamed from the CloudXR server and collects motion and controller data from the VR headset that is sent to the CloudXR server.
The VR headset must be capable of decoding 4K HEVC video @ 60fps. The provided sample client has been tested with the Oculus Quest Pro and Oculus Quest 3 devices, running at 72 Hz.
Building the Oculus VR Client¶
Make sure you have everything needed from the Android Sample Clients system requirements.
Copy the OVR mobile SDK zip file that you downloaded into the
{sdk-root-folder}\Sample\Android\OculusVR\app\libs
folder and rename the fileovr_sdk.zip
.Copy Google Oboe SDK
.AAR
file (oboe-1.5.0.aar
) into the{sdk-root-folder}\Sample\Android\OculusVR\app\libs
folder.Copy the CloudXR SDK client package, which is the
CloudXR.aar
file, from{sdk-root-folder}\Client\Lib\Android
folder to the{sdk-root-folder}\Sample\Android\OculusVR\app\libs
folder.Run Android Studio.
Complete one of the following tasks:
Select Open existing Android Studio project on the Welcome screen.
Click File > Open.
Navigate to
{sdk-root-folder}\Sample\Android
and open theOculusVR
project/folder.Select Build > Make Project.
This process should generate an .apk file in the {sdk-root-folder}\Sample\Android\OculusVR\app\build\outputs\apk\debug
directory that can be used to debug or be installed manually. You can also automatically generate a debug-signed .apk by directly running from within Android Studio. See Running the Oculus VR Client for more information.
Note
To build from the command-line, run gradlew build
from the OculusVR
folder.
Installing the Oculus VR Client¶
Note
This section is only necessary should you want to manually install from command-line. If you are running through Android Studio, it will take care of the installation, so you can skip ahead to Running the Oculus VR Client. However, the first few steps below may be relevant if you haven’t already set up for debugging on your device.
Place the Oculus VR device in developer mode and allow a USB connection in debug mode on the device.
Use a USB cable to connect the Oculus VR device to the development system.
If prompted on the device to allow connections, select Allow.
In a Command Prompt window, navigate to the folder that contains the .apk file that was created by building the sample application.
Use ADB to install the application from the release .apk file.
adb.exe install -r <APK name>.apk
Note
By default, the
ADB.exe
program is installed by Android Studio inC:\Users\{username}\AppData\Local\Android\Sdk\platform-tools
When the installation is complete, ADB responds with a Success message.
Running the Oculus VR Client¶
Note
See Command-Line Options, for more information about command-line/launch options and a complete list of all the available options, and How to Launch on Android for the various methods for starting the application.
Start SteamVR on the server system.
Start the CloudXR Client app on the Oculus device.
This process can be completed in one of the following ways:
If installed from ADB with a launch options file, launch from VR on the device:
Open the main menu.
Select Library > Unknown Sources.
Select the CloudXR Client app.
If building in Android Studio, deploy/run directly.
You can also set launch options inside the Configuration. Again, for more information on how to set launch options from Android Studio, see Command-Line Options and How to Launch on Android.
Note
If prompted, grant any requested permissions on the device.
Start the OpenVR application on the server that will be streamed to the client.
This process can be completed in one of the following ways:
On the server, just launch the app directly.
On VR client with controllers, click Menu on the left controller to bring up the SteamVR launcher, and pick the application from that panel.
Note
Launch the OpenVR application only after the client has connected to the server unless the client has been pre-configured on the server. Otherwise, the application will report that there is no connected headset. (This is because when a client first connects, it reports its specifications, such as resolution and refresh rate, to the server, at which time the server creates a virtual headset device.)
If the application exits immediately, ensure that you have disabled all Oculus experimental features, such as Show My Desk in VR.