Forum Discussion
FredTA
1 year agoProtege
How to launch another app from my first app (outside the store)
For context: My team is trying to create a delivery system for VR EdTech applications at Imperial College London. For our desktop version, each individual learning app is built to an AssetBundle and...
- 1 year agoFound the fix, manifest needs the "query all packages" permission, like so<manifest xmlns:android="http://schemas.android.com/apk/res/android"package="com.example.yourapp"><uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" /><!-- Other permissions and application components --></manifest>
vercelsmith
1 year agoHonored Guest
It looks like your issue stems from the getLaunchIntentForPackage method returning null, which typically happens when the specified package name is incorrect, or the target app does not have a launchable activity. Since you confirmed the package name works when launching from SideQuest or the headset’s menu, you may need to explicitly specify the main activity in your intent. Try using new Intent() with setComponent(new ComponentName(packageName, "com.unity3d.player.UnityPlayerActivity")) instead of relying on getLaunchIntentForPackage. Additionally, ensure that the target app's manifest has <category android:name="android.intent.category.LAUNCHER"/> inside its activity declaration. If the issue persists, check the logs for further hints and confirm that the launcher website app has the necessary permissions to start external activities.
- FredTA1 year agoProtege
Thanks for the thoughts - package name was correct and intent was launchable, what I was missing was the right permission in the manifest - see solution above
- vercelsmith1 year agoHonored Guest
Since the issue was resolved by adding the right permission in the manifest, it’s likely that the missing permission was related to launching external applications or activities. In future cases like this, make sure to check the AndroidManifest.xml for necessary permissions, such as:
<uses-permission android:name="android.permission.QUERY_ALL_PACKAGES"/> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
Also, ensure that the target app’s activity has the correct intent filters:
<intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter>
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 2 years ago
- 1 year ago
- 2 years ago