android:excludeFromRecents Must Be Set to TRUE

android:excludeFromRecents

So, I finally completed all the graphical assets in my submission of PENTAPUZZLE to the Oculus Store!

I eagerly uploaded my binary and… BOOM! Immediately I was met with two errors:

android:excludeFromRecents in AndroidManifest.xml must be set to TRUE

And this one:

apk main activity intent filter includes
android.intent.category.leanback_launcher which is not allowed.
Please remove it from androidmanifest.xml and retry

Back to googling. Not much info to be found. I figured out from various posts that I could use Android Studio to look inside of the binary compilation of the AndroidManifest.xml file, which is embedded in the apk file.

For sure, I could verify that the attributes referenced in the error message were not in the proper state. What to do?

Some posts argued to edit the embedded AndroidManifest.xml file and re-sign the package. It sounded like a whole lot of fuzz to me. And why couldn’t I find more info regarding this complex issue?

Oculus Integration to the Rescue

I just couldn’t believe that you would need to use some obscure tool to complete your default build in order to submit it to the Oculus Store. That would be a showstopper for a lot of people. I figured it’s my setup that’s messed up.

So I tried installing the Oculus Integration Package to Unity to see if it would contain anything nice (yes, I was not using it as I decided to go with Unity’s XR Interaction Toolkit instead).

For sure, this was it. After simply installing Oculus Integration (which took foreeeeever on my old T450s laptop) the leanback_Launcher error magically disappeared.

I was still facing the android:excludeFromRecents error but solved it by using this function that comes with Oculus Integration:

android:excludefromrecents

Then rebuild, back to the Oculus Store to upload my apk binary. Hold my breath. Wait for it… Wait for it…

Finally! The build was accepted for review! What a great milestone and a huge relief after two months of late nights learning Unity from scratch and building my first VR game.