{"_id":"5a5e54cd09ddf10030980b44","category":{"_id":"5a5e54cd09ddf10030980b3f","version":"5a5e54cd09ddf10030980b3e","project":"5a065a6134873d0010b396ab","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-10-25T23:36:45.975Z","from_sync":false,"order":0,"slug":"basics","title":"Getting Started"},"project":"5a065a6134873d0010b396ab","user":"57bb7e47afc18c0e00529cf3","parentDoc":null,"version":{"_id":"5a5e54cd09ddf10030980b3e","project":"5a065a6134873d0010b396ab","__v":1,"createdAt":"2018-01-16T19:38:53.276Z","releaseDate":"2018-01-16T19:38:53.276Z","categories":["5a5e54cd09ddf10030980b3f","5a5e54cd09ddf10030980b40","5a5e54cd09ddf10030980b41","5a5e54cd09ddf10030980b42"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.2.0","version":"1.2.0"},"__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-11-15T21:29:57.377Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"## Prerequisites\n\n1. An Android device that supports [Cardboard](https://vr.google.com/cardboard/), [Daydream](https://vr.google.com/daydream/), [Gear VR](https://developer.oculus.com/) or [ARCore](https://developers.google.com/ar/discover/#supported_devices)\n2. A compatible headset for Daydream or Gear VR\n\n## Android Studio\n\nDownload and install [Android Studio](https://developer.android.com/studio/index.html) for your operating system.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"For AR/ARCore:\",\n  \"body\": \"If you plan on using the AR features, ensure that you are installing Android Studio version 2.3 or higher with Android SDK Platform version 7.0 (API level 24) or higher.\"\n}\n[/block]\n## Prepare your device for development\n\n1. [Enable Developer Mode](https://developer.android.com/studio/debug/dev-options.html#enable) on your Android device\n2. [Enable USB Debugging](https://developer.android.com/studio/debug/dev-options.html#debugging) within the Developer Menu\n3. Connect your device to your computer via USB. When a pop-up appears asking to \"Allow USB Debugging?\", select \"OK\".\n\n#### For Cardboard/Daydream\n\nEnsure your device has the latest Cardboard, Google VR Services and/or Daydream applications installed from the Play Store. Your device may not support all 3 applications, but update all of those your device does support.\n\n#### For ARCore\n\nFollow the instructions [here](https://developers.google.com/ar/develop/java/getting-started#prepare-device) to install the ARCore Service onto your device. For this version of Viro, we require the ARCore Developer Preview 2.0. You can find this version of ARCore [here](https://github.com/google-ar/arcore-android-sdk/releases/download/sdk-preview2/arcore-preview2.apk).\n\n # Download the Hello World Project\n\nDownload and unzip the Hello World project [here](https://s3-us-west-2.amazonaws.com/virocore/1_2_0/virocore-helloworld.zip).\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"For GearVR\",\n  \"body\": \"If you're trying to use build for GearVR, follow the instructions [here](https://dashboard.oculus.com/tools/osig-generator/) to generate an OSIG file for your device. Once you have the OSIG file, place the file in your project's `<project_root>/app/src/main/asset` directory.\"\n}\n[/block]\n## Build and Run the Hello World App\n\n1. Open the project\n2. If you're asked about enabling Instant Run, select 'Don't remind me again for this project'\n3. Once the project initializes, run a Gradle sync\n4. Open the AndroidManifest.xml and place your Viro API key where it says \"API_KEY_HERE\".\n5. Open the Build Variants pane on the left\n6. Select the Build Variant for the App that you want to build\n  - `gvr` for Cardboard/Daydream (Google)\n  - `ovr` for Gear VR (Oculus)\n  - `arcore` for ARCore support\n  - `scene` for a generic 3D renderer","excerpt":"","slug":"getting-started","type":"basic","title":"Getting Started"}
## Prerequisites 1. An Android device that supports [Cardboard](https://vr.google.com/cardboard/), [Daydream](https://vr.google.com/daydream/), [Gear VR](https://developer.oculus.com/) or [ARCore](https://developers.google.com/ar/discover/#supported_devices) 2. A compatible headset for Daydream or Gear VR ## Android Studio Download and install [Android Studio](https://developer.android.com/studio/index.html) for your operating system. [block:callout] { "type": "info", "title": "For AR/ARCore:", "body": "If you plan on using the AR features, ensure that you are installing Android Studio version 2.3 or higher with Android SDK Platform version 7.0 (API level 24) or higher." } [/block] ## Prepare your device for development 1. [Enable Developer Mode](https://developer.android.com/studio/debug/dev-options.html#enable) on your Android device 2. [Enable USB Debugging](https://developer.android.com/studio/debug/dev-options.html#debugging) within the Developer Menu 3. Connect your device to your computer via USB. When a pop-up appears asking to "Allow USB Debugging?", select "OK". #### For Cardboard/Daydream Ensure your device has the latest Cardboard, Google VR Services and/or Daydream applications installed from the Play Store. Your device may not support all 3 applications, but update all of those your device does support. #### For ARCore Follow the instructions [here](https://developers.google.com/ar/develop/java/getting-started#prepare-device) to install the ARCore Service onto your device. For this version of Viro, we require the ARCore Developer Preview 2.0. You can find this version of ARCore [here](https://github.com/google-ar/arcore-android-sdk/releases/download/sdk-preview2/arcore-preview2.apk). # Download the Hello World Project Download and unzip the Hello World project [here](https://s3-us-west-2.amazonaws.com/virocore/1_2_0/virocore-helloworld.zip). [block:callout] { "type": "info", "title": "For GearVR", "body": "If you're trying to use build for GearVR, follow the instructions [here](https://dashboard.oculus.com/tools/osig-generator/) to generate an OSIG file for your device. Once you have the OSIG file, place the file in your project's `<project_root>/app/src/main/asset` directory." } [/block] ## Build and Run the Hello World App 1. Open the project 2. If you're asked about enabling Instant Run, select 'Don't remind me again for this project' 3. Once the project initializes, run a Gradle sync 4. Open the AndroidManifest.xml and place your Viro API key where it says "API_KEY_HERE". 5. Open the Build Variants pane on the left 6. Select the Build Variant for the App that you want to build - `gvr` for Cardboard/Daydream (Google) - `ovr` for Gear VR (Oculus) - `arcore` for ARCore support - `scene` for a generic 3D renderer