Creating the Android Client

In order to use our Android device with the Gear VR, we have to include our Oculus Signature File. If you haven’t generated this file yet, please refer to 4.2.3. Place the osig file in the Plugins > Android > assets folder next to the PUT_OSIG_HERE file.

Switch the target platform by going to File > Build Settings…, select Android from the list of platforms and press the Switch Platform button.

After the platform is switched to Android, press the Player Settings… button and change the settings as shown in the figure below. The Bundle Identifier, Company Name and Product Name should be relevant to your application when creating your own VRee-enabled application.

Make sure a development Android phone is connected to the development PC and press Build And Run in the Build Settings window. This will create an Android Application Package (.apk) file of our project which is installed on the phone.

After the application is installed on the development phone, make sure the phone and the development PC are connected to the same network. Start the application, insert the device in the Gear VR and accept all permissions. The application will appear to hang while it is waiting to connect to the server.

We’ll now start the server by pressing the play button in Unity. The client will automatically connect to the server. The client shows up on the server UI (seen below) and the head rotations are received through the ClientHeadUpdatePacket. For more information about the networking system, refer to 5.4.