Skip to content

Restore AndroidHarness activity, deprecate it#2774

Open
8Keep wants to merge 5 commits into
jMonkeyEngine:masterfrom
8Keep:restore-android-harness
Open

Restore AndroidHarness activity, deprecate it#2774
8Keep wants to merge 5 commits into
jMonkeyEngine:masterfrom
8Keep:restore-android-harness

Conversation

@8Keep
Copy link
Copy Markdown
Contributor

@8Keep 8Keep commented May 15, 2026

Fixes #2765

Add a new AndroidHarness activity that emulates the old one, just wrapping a AndroidHarnessFragment.

Also changes the gradle build so the androidx stubs are treated as compile time only. A real jmonkey android application should provide its own androidx dependencies.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the Android build configuration to manage stubs and introduces a deprecated AndroidHarness activity that wraps AndroidHarnessFragment via reflection. Feedback suggests improving encapsulation by making the fragment field a local variable in onCreate and replacing the reflection-based fragment attachment with type-safe calls by expanding the compile-time stubs for the Fragment API.

Comment thread jme3-android/src/main/java/com/jme3/app/AndroidHarness.java Outdated
Comment thread jme3-android/src/main/java/com/jme3/app/AndroidHarness.java Outdated
Comment thread jme3-android/src/main/java/com/jme3/app/AndroidHarness.java
@8Keep 8Keep marked this pull request as ready for review May 16, 2026 18:19
@8Keep
Copy link
Copy Markdown
Contributor Author

8Keep commented May 16, 2026

Need some testing with some users existing android apps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bring back a deprecated AndroidHarness to make it easier to move to 3.10

1 participant