UnityPlayerActivity Java class has vanished?

In Unity 2019.3.0f6, I cannot find the Java class UnityPlayerActivity. The documentation implies there should be compiled version in classes.jar. I cannot find the classes.jar containing UnityPlayerActivity. It has the namespace unity3d.player but no Activity to extend.

Where can I find UnityPlayerActivity? Thanks in advance.

I looked in all of these:
\Hub\Editor\2019.3.0f6\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Development\Classes\classes.jar
Hub\Editor\2019.3.0f6\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\il2cpp\Release\Classes\classes.jar
Hub\Editor\2019.3.0f6\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\mono\Development\Classes\classes.jar
Hub\Editor\2019.3.0f6\Editor\Data\PlaybackEngines\AndroidPlayer\Variations\mono\Release\Classes\classes.jar

OK, I misunderstood the documentation. UnityPlayerActivity.java is a loose, uncompiled Java file which I found here: C:\Program Files\Unity\Hub\Editor\2019.3.0f6\Editor\Data\PlaybackEngines\AndroidPlayer\Source\com\unity3d\player

I thought I was supposed to extend the compiled UnityPlayerActivity but it seems like you can just include the .java file in a project, edit or extend it, then compile the thing into a .jar and include it in the project as a plugin.

You can also just add .java files to your Unity project (Unity - Manual: Java and Kotlin source plug-ins)

1 Like