Getting Started with Gear-VR Development

Screen Shot 2016-08-22 at 10.54.34 PM.png

For the last 8 months, I have been working on VR prototypes for Comcast, one of which we showed off recently at the Cable Show and have been talking about at different conferences (you can see the deck here).

We recently started adding some new faces to my team and so I figured it might be a good idea to put down a quick how-to on GearVR apps. A lot of it can be found at different links on the internet, but this might be useful to go from zero to a quick “Hello World” app using Unity.

1. Setting Up GearVR for Android build:

Since  VR apps for the GearVR are Android apps, the standard Android setup for development is required:

  1. Go to the Settings app on your Samsung phone and go to About Phone settings.
  2. Tap the “Build Number” item on the list repeatedly till you see a “You are now a developer” message
  3. Now in the main Settings list, you’ll see a Developer options menu item
  4. Tap on it and in the list that comes up, turn on `USB debugging`  toggle button.
  5. Connect your phone to your laptop and an alert will appear asking you if you’d like to allow the PC to debug your app. Tap yes.

USB-debug_auth

2. Create a Unity app

  1. Install the latest version of the Unity IDE including the Android plugin.
  2. Create a quick new project (just put a cube in front of the camera so that you have something to see when the app launches)
  3. From the Unity IDE toolbar, click on File -> Build Settings
  4. Unity probably defaulted you to a Mac/Windows app export. From the platform list, click on Android and then click on Switch Platform. This might take a couple of minutes as Unity converts the project.Screen Shot 2016-08-22 at 10.18.39 PM
  5. When done, tap on the Player Settings. In the settings that appear, tap on the Android tab, and in the Other Settings, select the Virtual Reality Supported option and enable the Oculus option.Screen Shot 2016-08-22 at 10.22.37 PM

3. Enable your Android device to run Oculus apps on device.

  1. Create a profile at developer.oculus.com 
  2. Connect your phone to your computer and use the adb devices command on the command line to detect the connected device. Copy the device id.
  3. Use the device id at the Oculus osig file generator. Paste the id in the form field and you’ll get an osig file.
  4. Save the osig file in your project in the Project > Plugins > Assets folder. This will allow Unity to package the file into the generated apk

4. Build and Run 

  1. Click the Build and Run item in the Unity toolbar. Unity will pack and deploy the app to your phone.
  2. You’ll probably get an alert saying “The app cannot be launched because there is no Launcher Activity in the app. But the app will be deployed to the device.
  3. Back on the phone, go to Settings > Application Manager and find an app called “Gear VR Service”. Select it.
  4. Tap Storage and then  Manage Storage
  5. Tap the VR Service Version label multiple times till you get a notification saying “You are now a developer”. Two other options will appear below: Developer Mode and Add Icon to app list Screen Shot 2016-08-22 at 10.44.42 PM
  6. Tap on the Add Icon to app list. This will add an icon at the phone’s app list (where you find all your other apps)
  7. Tap the icon from the apps list. The launching activity will list all your available VR apps. Find your app and tap on it. You’ll get a screen instructing you to insert the phone into the GearVR. Inserting it will launch your app 🙌

 

Getting Started with Gear-VR Development

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s