CodeAndQuestsEveryDay icon indicating copy to clipboard operation
CodeAndQuestsEveryDay copied to clipboard

Code Question: What should I do with the Android Manifest for the Quest ?

Open EloiStree opened this issue 5 years ago • 4 comments

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.

  1. Create Folder Plugins/Android in Assets root
  2. 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>
  1. And build.

Source

image image

  • 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

EloiStree avatar Aug 13 '19 13:08 EloiStree

image https://www.reddit.com/r/oculus/comments/cjarm3/unity_development_on_oculus_quest_only_one/evcanvy/

EloiStree avatar Aug 13 '19 13:08 EloiStree

Disto

<?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" />

EloiStree avatar Aug 13 '19 13:08 EloiStree

Edit the manifrest

image https://answers.unity.com/questions/536095/how-to-write-an-androidmanifestxml-combining-diffe.html

EloiStree avatar Aug 13 '19 13:08 EloiStree

Classic edit manifest

Default Alt
https://youtu.be/G4-bPjhe2A4

EloiStree avatar Aug 13 '19 14:08 EloiStree