Gear VR Headset Prerequisites
Before we can get into UE4 Gear VR development, we first must make sure that the following prerequisites are fulfilled because if we don't, we run the risk of having Gear VR projects not working with the Gear VR Headset.
Make sure you have the USB cord used for charging your Samsung Galaxy Smartphone available and plugged into a USB port on the PC you are developing on.
The USB cord is of vital importance, as this is how you transfer data between your development PC and your Smartphone.
Only the following types of Samsung Galaxy Smartphones will work with the Gear VR Headset.
Galaxy Note 8, S8, S8+, S7, S7 edge, Note5, S6 edge+, S6, S6 Edge
For more information, make sure to check out the Samsung GearVR website.
Make sure to download and install the specific USB drivers for your Galaxy Smartphone from the Samsung Website.
Install the CodeWorks for Android 1R6u1, which can be found in Engine\Extras\Android.
Check to see if Developer Mode has been enabled on your Samsung Galaxy Smartphone and if not, enable it.
To make sure your PC will always recognize your device after unplugging/plugging it in, you can enable USB Debugging in the developer options. When doing so, make sure to accept the RSA Fingerprint key from your PC, or you will not be able to deploy to your device.
Generate and download the OSIG File for your Samsung Smartphone using your Smartphone's Device ID and the Oculus website.
If you are not sure how to get your Smartphone's Device ID, the Oculus website has detailed directions on how to do this.
After you download the OSIG file, create a folder called assets and place the OSIG file inside of it.
Then, place that folder in Engine/Build/Android/Java.
If you do not do this, your project will fail to launch on your Smartphone.
You can also place the OSIG file in your project's Build/Android/assets directory instead of Engine/Build/Android/Java.
Keep in mind that adding your OSIG file in this manner will result in your OSIG file only being used in the project that it is added to and not for any Gear VR project.
It is very important that you make sure all items listed in the Gear VR Prerequisites section are completed before moving on to the next part.
Skipping a step could result in your project not working with the Gear VR Headset.