Skip to main content
New Participant
August 16, 2016

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

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
This topic has been closed for replies.

11 replies

Inspiring
August 21, 2016
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.
Inspiring
August 22, 2016
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?
Inspiring
August 22, 2016
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.
New Participant
October 26, 2016
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.

 AndroidManifest.xml

<?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">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.INFO"/>
            </intent-filter>
            <meta-data android:name="unityplayer.UnityActivity" android:value="true"/>
        </activity>
        <meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
    </application>
    <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"/>
</manifest>


There is some else wrong that i have done?

Best Regards!
Pablo
Inspiring
October 26, 2016
android:excludeFromRecents="true" goes in your activity, not your application.
New Participant
October 28, 2016

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!

Regards!
Pablo
New Participant
July 5, 2017
@AngelusDarkness
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?
Participant
July 6, 2017
@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.
Up and Coming
June 12, 2019
Hello.
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 :

mousebear
Honored Contributor
June 21, 2019
@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 through the "Contact Us" link (include what you've gathered in step 1). 3. Tag me @mouse_bear once you have done so!