Ue4 has not Gameactivity.java

I downloaded ue4 4.12 but I haven’t the directory C:\Epic Games\Epic Games\4.12\Engine\Build\Android\Java\src\com\epicgames\ue. My epicgames folder is empty! I know that probably that is a easy problem, but I need help. I need to modify GameActivity.java but I haven’t the folder that contains GameActivity.java.

This post has the basics you need to get started modifying your GameActivity.java… haven’t seen a way to edit it directly.

You’ll add a MyProject_Additions.xml file and add instructions to modify the game activity using UnrealPluginLanguage (use of which is documented in the UnrealPluginLanguage.cs file as a humongous block comment.)

Something like:

  <gameActivityClassAdditions>
    <insert>
    public String AndroidThunkJava_ReadIntentData()
    {
      Intent incoming = getIntent();
      
      if(incoming == null) return "";

      return incoming.getDataString();
    }
    </insert>
  </gameActivityClassAdditions>

You’ll then have to add hooks in AndroidJNI to call your Java thunk. I’m currently right this second looking for a way to modify an existing function in GameActivity.java, but I think I’ll end up having to change the AndroidPlatform C++ to just hook into a custom function. (I want to override LaunchURL)