This site has been archived and remains strictly as a historical reference for developers who actively maintain apps built using the legacy Google VR SDK, which was last updated in 2019 and is no longer receiving updates.
  • All developers actively developing experiences for Google Cardboard should use the new open source Cardboard SDKs for iOS, Android NDK, and Unity XR Plugin. These new SDKs offer streamlined APIs, improved device compatibility, and built-in viewer profile QR code scanning.
  • The Daydream View VR headset is no longer available for purchase as of October 15, 2019. Existing apps on supported devices are unaffected for users who previously installed those applications. It is no longer possible to opt-in to Daydream distribution via Google Play.

Quickstart for Google VR SDK for Android NDK

This document describes how to get started with Google VR for Android by building a sample C++ app using the NDK.

Most NDK developers have their own preferred way of building and deploying applications. This tutorial uses Android Studio, but you should feel free to follow along in the build environment of your choice.

We'll build the following sample app in this guide:

  • HelloVR, a sample app that works with any VR viewer and uses touch events to interact with the system.

Build the HelloVR sample app

First, read about HelloVR and how to build it using the SDK. The requirements and steps to build the app using the NDK are nearly the same, with the following key differences:

  • Download the latest version of the Android NDK.

  • Extract the NDK .so files by running:

     ./gradlew :extractNdk
    
  • In settings.gradle, uncomment the following line to enable that sample:

     include ':samples:ndk-hellovr'
    
  • Select samples-ndk-hellovr as your target.