If you want to add a button in your app to open an external webpage you would use a Launch URL blueprint block to do this. I’m on my first Android app and working my way through the Google Play requirements. One such requirement is the SDK target for new apps must be set to 30. In SDK target 29 the Launch URL block worked, in 30 it doesn’t.
It seems there is a new permission requirement now. In your project settings, go to the Advanced APK Packaging section → Extra Permissions → Add a new array element: android.permission.QUERY_ALL_PACKAGES
As a secondary point, for AAB packaging, in the App Bundles section, make sure you check Generate bundle (AAB) and in the APK Packaging section check Package game inside .apk. If you are using the save game functionality, in the APK Packaging section, check Use ExternalFilesDir for UE4Game files to enable file writes.
In case upgrading isn’t an option for some reason, there are 2 things that are required additionally to make launching URLs work for SDK target 30 without adding the QUERY_ALL_PACKAGES permission:
As described here, the android manifest file needs to be extended to properly handle queries to intents of other apps - like when opening a link in a browser.
This can be done using a UPL file to edit the manifest, as this file is assembled while packaging the project. A neat explanation of how to create and use such a file to modify the manifest can be found here
For the UPL file use this content to add the required lines to the manifest:
By first method you mean adding the android.permission.QUERY_ALL_PACKAGES permission, right?
It is basically in our all interest to give apps on our android devices only those permissions that are really required. Otherwise, in case each app has all permissions, you wont be able to tell if some of them are now spying on your phone calls or maybe tracking what apps you are having installed - where the latter would be doable using the QUERY_ALL_PACKAGES permission.
Therefore Android ranks this permission as “high risk” / “sensitive” and only allows it to be used if actually required by your app. This means, when just using it as a shortcut to open links, your app will pretty likely never be approved to be published on the play store.
You can read more about it here, as @BOB.cat wrote already:
Here a quote (from link above) explaining further when the usage of this permission would be allowed:
To use this permission, your app must fall within permitted uses below, and have a core purpose to search for all apps on the device. You must be able to adequately justify why a less intrusive method of app visibility will not sufficiently enable your app’s policy-compliant user-facing core functionality.
Core functionality is defined as the main purpose of the app. Without this core ability to search for all apps on the device, the app is “broken” or becomes unusable. The core functionality, as well as any core features that comprise this core functionality, must all be prominently documented and promoted in the app’s description.
@ganbaa_elmer are you trying to open a deepLink from an application like whatsapp, which then should automatically open your own app?
Or are you trying to open a link like https://twitter.com using the LaunchURL node from within your app, which then should bring up the installed twitter app?
@Featuriing am trying to open app by using Launch URL. source app is my ue4 game and destination apps is already installed apps on my phone. Not websites, not like https://twitter.com
i mean i need to open Twitter app on my mobile phone. (Android and IOS)
for Android SDK 29 its working fine but on SDK 30 it didn’t work.
As I wrote in my initial post: There are 2 things you need to do. You have to add the to your android manifest file using a custom UPL file. And you have to edit the engine source code to add the CATEGORY_BROWSABLE to the browserIntent before starting it. Once these two things are done (and the engine is recompiled) you should be able to properly open apps like twitter, using http://twitter.com, for example.
Check my initial post, as well as the links that I was sharing there, for more detailed instructions