This guide shows you how to set up Google VR development with the Android NDK and build the HelloVRBeta sample app. This app is designed to help you learn about working with the see-through mode technology as well as the experimental 6DoF controllers and faceplate.
- Download and install the latest version of
gvr-android-sdk\*.zipfrom the releases page.
Follow these steps to build and run the HelloVRBeta sample app. The requirements and steps to build the sample app using the NDK are nearly the same as building the HelloVR sample app for the SDK, with the following key changes:
- Download the latest version of the Android NDK.
Extract the NDK
.sofiles by running:
settings.gradle, uncomment the following line:
To build and run the sample app in Android Studio, select samples-ndk-hellovrbeta as your target.
If you're familiar with developing for Daydream, here are the changes you need to make in order to support the 6DoF controllers and faceplate:
To identify your app as supporting the 6DoF controllers and faceplate, add the following meta-data tag to your
AndroidManifest.xmlfile within the
<activity … <meta-data android:name="com.google.vr.controllers.supportedConfigs" android:value="3Dof|2x6Dof"/> </activty>
Make sure your
GVR_CONTROLLER_ENABLE_POSITION; otherwise, the position data will be discarded.