CodeAndQuestsEveryDay
CodeAndQuestsEveryDay copied to clipboard
Code Question: What should I do with the Android Manifest for the Quest ?
How to set android manifest for Quest
Ok so before the 20 June 2019 you did not need to touch to the Android Manifest to build on the Quest. But Oculus Team did a change on it. So you need to use it if you want the Quest to behave like it and not like a Go.
So what I did based on friend an reddit post.
- Create Folder Plugins/Android in Assets root
- Copy this code in the a AndroidManifest.xml file
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto">
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
<!-- Request the headset DoF mode -->
<application
android:allowBackup="false">
<activity
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
android:launchMode="singleTask"
android:name="com.unity3d.player.UnityPlayerActivity"
android:label="@String/app_name"
android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.INFO"/>
</intent-filter>
</activity>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" />
</application>
</manifest>
- And build.
Source
- Source: https://www.reddit.com/r/oculus/comments/cjarm3/unity_development_on_oculus_quest_only_one/
- https://developer.oculus.com/documentation/quest/latest/concepts/mobile-native-manifest/
- https://docs.unity3d.com/Manual/android-manifest.html
https://www.reddit.com/r/oculus/comments/cjarm3/unity_development_on_oculus_quest_only_one/evcanvy/
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto">
<uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" /><!-- Request the headset DoF mode -->
<application
android:allowBackup="false">
<activity
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
android:launchMode="singleTask"
android:name="com.unity3d.player.UnityPlayerActivity"
android:label="@String/app_name"
android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.INFO"/>
</intent-filter>
</activity>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" />
</application>
</manifest>
Plus:
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.INFO"/>
</intent-filter>
</activity>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" />
Edit the manifrest
https://answers.unity.com/questions/536095/how-to-write-an-androidmanifestxml-combining-diffe.html