cancel
Showing results for 
Search instead for 
Did you mean: 

How to build for Oculus Quest /w Unity, after the 7.0 Update?

larsonmattr
Explorer
I am building an application for the Quest using Unity 2019.1, using the Unity XR API to provide all tracking with TrackedPoseDriver. Prior to the 7.0 Quest Build Update, building the APK from Unity was working correctly. After the 7.0 Update of July 25th, the controller input is no longer correct and perhaps the application is now running as an emulated Oculus Go.

Can you provide a solution to correctly build an APK from Unity 2019.1 that will have the correct android manifest so that the APK runs as an Oculus Quest application?

1) Ideally this could be solved without custom editing of the Android Manifest, perhaps by setting certain combination of min/max SDK versions, etc. Can a method be provided so that Unity builds still automatically generate the correct android manifest?

2) Fall back is to have a way to manually edit the Android Manifest. If this is the only solution, what lines/statements need to be set in the Android Manifest to correctly run as a Quest application?
4 REPLIES 4

larsonmattr
Explorer
I believe this might be the line that is missing from the android manifest xml file:
<uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1"/>

larsonmattr
Explorer
Or, version="2", if you only care about supporting the Oculus Quest.

larsonmattr
Explorer
I submitted a bug ticket to Unity to see if they could update the software to include the missing line in the android manifest XML. 

larsonmattr
Explorer
Here is the official response I just received from the Oculus Support:

"Thank you for reaching out. Please rebuild your manifest file:

1. Within the Unity editor, remove the current manifest by clicking on Oculus -> Tools -> Remove AndroidManifest.xml
2. Generate a new AndroidManifest by clicking on Oculus -> Tools -> Generate store-compatible AndroidManifest.xml


If you are not utilizing the Oculus Integration, or are using a previous version, please include the following line in your existing AndroidManifest.xml:
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
Let me know if any of these help solve your issue."


I was able to add the line and rebuild by doing this:

 In your project create a folder at `Assets\Plugins\Android`.
1. After the `Build` completes do not close Unity, and copy the newly created `Temp/gradleOut/src/main/AndroidManifest.xml` to `Assets\Plugins\Android`.
2. Edit `AndroidManifest.xml` and add this line after other `uses-feature` lines:

<uses-feature android:name="android.hardware.vr.headtracking" android:required="true" android:version="1"/>