This worked back in 4.17. I’ve tried several LoadingPhase’s but to no avail.
Why wouldn’t I be able to find the game activity class?
JNIEnv* env = FAndroidApplication::GetJavaEnv();
jclass localGameActivityClass = FJavaWrapper::FindClass(ENV, "com/epicgames/ue4/GameActivity", false);
__android_log_print(ANDROID_LOG_INFO, LOG_TAG, "AndroidCamera: StartupModule - localGameActivityClass: 0x%p", GameActivityClassID);
GameActivityClassID = (jclass)ENV->NewGlobalRef(localGameActivityClass);
Android log output:
05-21 19:40:09.056 15650 15667 I CameraLOG: AndroidCamera: StartupModule
05-21 19:40:09.057 15650 15667 W System.err: java.lang.ClassNotFoundException: Didn't find class "com.epicgames.ue4.GameActivity" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/system/lib, /vendor/lib, /system/lib, /vendor/lib]]
05-21 19:40:09.058 15650 15667 W System.err: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
05-21 19:40:09.058 15650 15667 W System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
05-21 19:40:09.058 15650 15667 W System.err: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
05-21 19:40:09.062 15650 15667 D UE4 : Assertion failed: Class != 0 [File:D:\Projects\MM419\Engine\Source\Runtime\Launch\Private\Android\AndroidJNI.cpp] [Line: 182]