Custom Activity

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:

    <activity android:name="com.epicgames.ue4.TestActivity"
                <meta-data android:name="" android:value="UE4"/>

Anyone know how to do this?

Where are you storing this ?

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).

Hey guys!

I wanted to start an activity by pressing a UMG button? How can I implement this?


You will need to write some C++ code to expose a Blueprint function to call Java using JNI.

Hi Chris
Thanks for your replay!
Where should I write my android activity( java functions ) and how to access them in my project?

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” />.