Welcome to the Oculus Developer Forums!

Your participation on the forum is subject to the Oculus Code of Conduct.

In general, please be respectful and kind. If you violate the Oculus Code of Conduct, your access to the developer forums may be revoked at the discretion of Oculus staff.

exclude from recents(android:excludeFromRecents in AndroidManifest.xml) must be set to true.

dheeraj786dheeraj786 Posts: 3
I am trying to submit my application for gear VR. 
using oculus validate tool it shows that everything is fine and i can upload the file but when i am doing that it says

exclude from recents(android:excludeFromRecents in AndroidManifest.xml) must be set to true.

I have already set this to true in manifest file


  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    There is currently a known issue with the AndroidManifest.xml generated by Unity. We are working to fix it, but in the meantime you will need to follow the instructions at http://answers.unity3d.com/questions/1174614/modifying-androidmanifest-for-gearvr.html to unpack, modify, and repack the APK before submitting it.
  • viewportviewport Posts: 82
    Hiro Protagonist
    One of our recent apps has failed submissions because 'it was asking for unnecessary permissions'. This doesn't appear to relate to the 'exclude from recents set to true' error shown above, but is it possible that when Unity is overwriting the AndroidManifest.xml it may be creating a permissions error as well? Is there anything else we should be looking out for that may have gone wrong in the manifest when we unpack, modify and repack?
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    The default manifest doesn't ask for any unnecessary permissions. However, Unity will add things like microphone and camera if it detects the app needing those (such as using Microphone.Start). If you have an additional AndroidManifest.xml in your Plugins/Android folder, it will be merged with the auto-generated one. If you use APKTool, you can decompile the manifest and see what it's actually requesting.
  • AngelusDarknessAngelusDarkness Posts: 3 Oculus Start Member
    Hi There i'm trying to upload a demo to Alpha channel, keep having this issue

    exclude from recents(android:excludeFromRecents in AndroidManifest.xml) must be set to true.

    Already unpacked apk, checked the manifest and trying again, but didn't success with it.


    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.throgs.TheBiumbis" platformBuildVersionCode="23" platformBuildVersionName="6.0-2438415">
        <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:xlargeScreens="true"/>
        <application android:banner="@drawable/app_banner" android:debuggable="false"  android:icon="@drawable/app_icon" android:isGame="true" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:excludeFromRecents="true">
            <activity android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode" android:label="@string/app_name" android:launchMode="singleTask" android:name="com.unity3d.player.UnityPlayerActivity" android:screenOrientation="landscape">
                    <action android:name="android.intent.action.MAIN"/>
                    <category android:name="android.intent.category.INFO"/>
                <meta-data android:name="unityplayer.UnityActivity" android:value="true"/>
            <meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
        <uses-feature android:glEsVersion="0x00030000" android:required="true"/>
        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.WAKE_LOCK"/>
        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
        <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
        <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false"/>
        <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false"/>

    There is some else wrong that i have done?

    Best Regards!
  • vrdavebvrdaveb Posts: 1,596 Oculus Staff
    android:excludeFromRecents="true" goes in your activity, not your application.
  • AngelusDarknessAngelusDarkness Posts: 3 Oculus Start Member
    vrdaveb said:
    android:excludeFromRecents="true" goes in your activity, not your application.
    You're totally right!!! Probably my mom let me fall by my head when was a child... or maybe i'm just too much burnt out for this project!!

    Thank you!

    You saved many lives here!

  • MuraliVenkatMuraliVenkat Posts: 1
    I ma having the same issue. What does it mean "android:excludeFromRecents="true" goes in your activity, not your application.". I do not understand. Can you help me in this?
  • juanoldinhojuanoldinho Posts: 131
    @MuraliVenkat it should be included in the activity element within your AndroidManifest.xml file.

    You can see an example here: https://developer.oculus.com/distribute/latest/concepts/publish-mobile-manifest/
    Please tag me, @juanoldinho, in your forum post/response if you need immediate assistance or want additional support or context on an issue you are having with our software or integrations.

    Having an issue with our platform, services, or integrations?

    Try using our new bug tool to report this and receive emailed updates as we proceed to address it internally.
  • FanghFangh Posts: 35
    Brain Burst
    edited June 2019
    Why are we 2 years later and there is still this bug when building with Unity 2019 ?!

    I had to find the AndroidManifest.xml in \Temp\StagingArea\ then copy it into \Assets\Plugins\Android\
    Then modify theses two lines :

  • NinjaGGNinjaGG Posts: 239 Oculus Staff
    @Fangh This isn't a bug - we encourage you to generate a store-compatible AndroidManifest.xml file using our Unity integration. To do so, within the editor, click on Oculus -> Tools -> Generate store-compatible AndroidManifest.xml.
    If you need immediate help or want additional support/context on an issue you are having with our platform or integrations:

    1. Gather any and all logs, screenshots, and version numbers of relevant software (Oculus SDK, engine, etc.)
    2. Please submit a ticket here (include what you've gathered in step 1).
    3. Tag me @NinjaGaijin once you have done so!
Sign In or Register to comment.