[Solved] Launch URL doesn't work in Android for SDK target 30

Hello,

I also struggled with this problem.

I didn’t wan’t to have the QUERY_ALL_PACKAGES activated for my app while still being able to use the Launch URL node to open the Google Maps App on Android.
I found a solution that doesn’t require to recompile the whole engine at this link which I translated in my language with google translate.

It tells you to edit the java file Engine/Build/Android/Java/src/com/epicgames/ue4/GameActivity.java.template
in the engine folder and comment out some lines that call the getPackageManager() function which requires that QUERY_ALL_PACKAGES permission:

//if (BrowserIntent.resolveActivity(getPackageManager()) != null)
//{
    Log.debug("[JAVA} AndroidThunkJava_LaunchURL: Starting activity");
    startActivity(BrowserIntent);
//}

On my specific case it worked and maybe someone will find this useful here :slight_smile:

4 Likes