When I try add my custom activity I get this error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.epicgames.TheTaleOfThreeMobile/com.epicgames.ue4.GameActivity}: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.epicgames.TheTaleOfThreeMobile/com.epicgames.ue4.TestActivity}; have you declared this activity in your AndroidManifest.xml?
But I declared this activity in AndroidManifest.xml:
AFAIK it should be in (ENGINEDIR)\Build\Android\Java\src\com\epicgames\ue4\ (i don’t have had a deep look at unrealbuildtool, but you could store it here until someone expert will clarify this)
What I’m doing is modifying directly the engine GameActivity class (located there).
You can write a plugin and register a UPL file to copy the java source to compile. Any hookup you need to the GameActivity can also be done in this file. Look at Gear VR or Google VR plugins for examples.
If you want to register your activity in AndroidManifest.xml, You can use ManifestApplicationAdditions.txt File.
In the path Build -> Android, Add the ManifestApplicationAdditions.txt File.
And, write the contents like this <activity android:name=“com.companyname.activity name” />.