My APK can be built, copied over to my phone via USB, and installed with no problems. If I run the app immediately after it installs (from the window with the options “Done” and “Open”), it works fine.
However, if I try and load the app after installing it, the App Info window comes up instead of launching the app. From the times I installed and ran my app everything works exactly as expected.
Here is my AndroidManifest.xml (auto-generated custom manifest from publishing settings), I’ve done some looking around and the few things I saw said my intent filters might not be set up correctly. I think I have an idea of what they do and have spent some time trying different things, but I’m more or less stabbing in the dark:
<?xml version="1.0" encoding="utf-8"?>
<!-- GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN-->
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="com.unity3d.player"
xmlns:tools="http://schemas.android.com/tools">
<application>
<activity android:name="com.unity3d.player.UnityPlayerActivity"
android:theme="@style/UnityThemeSelector">
<intent-filter>
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.MAIN" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
</application>
</manifest>
I’m not very experienced in the specifics of Android development, only really interact with stuff like this in the context of building Unity apps. Is there anything in this manifest that would lead to my app having its main activity set to load the app info page? Any pointers would be greatly appreciated.
Some of the more SUS lines I’ve found using logcat
Info ActivityTaskManager START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 hwFlg=0x10 cmp=com.Company.VR/android.app.AppDetailsActivity bnds=[42,118][294,423]} from uid 10067
Info ActivityTaskManager START u0 {act=android.settings.APPLICATION_DETAILS_SETTINGS hwFlg=0x10 cmp=com.android.settings/.applications.InstalledAppDetails} from uid 10265
Any ideas where the APPLICATION_DETAILS_SETTINGS is coming from? I’ve searched my project and manifest files and none of them point to this intent.
Thank you! I found that, for whatever reason, this manifest decided to create this intent filter, which I believe is the culprit. Checked some other apps I built recently and none of them had this problem, very strange.
Only thing now is I get this on the top line with the version info/sdk versions:
Error:External resource http://schemas.android.com/apk/res/android is not registered
It doesn’t look like android studio will let me save my changes until all my errors are fixed?
The project we are using is made to be multi-platform, we swap around to build stuff to mobile using AR, and PC using VR. In an Oculus script called OvrGradleGeneration.cs is this line (commented out):
So it turns out, even though I had Oculus disabled in my XR plugin management, it was still managing to get into my build and change my launcher intent.
Unrelated to this specific issue but have had multiple other problems popping up with regards to OvrGradleGeneration.cs.
This file LOVES adding random things to your manifest that you don’t expect. It was manually adding “android.hardware.vr.headtracking” to my manifest, taking my compatible devices on the play store from ~200, to 4.
So if you have a problem with your build/getting it to work on certain devices, check your manifest for unwanted lines and check if this class is the culprit.
I have Oculus unchecked in my XR plugin management settings so it’s very confusing why Unity is still asking for its opinion when building.