-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor Godot Android architecture #76821
Merged
YuriSizov
merged 2 commits into
godotengine:master
from
m4gr3d:prototype_godot_service_main
Jul 17, 2023
Merged
Refactor Godot Android architecture #76821
YuriSizov
merged 2 commits into
godotengine:master
from
m4gr3d:prototype_godot_service_main
Jul 17, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9c4482c
to
c3cf285
Compare
b845ba2
to
12adf29
Compare
a0a54e2
to
0651104
Compare
2082aa0
to
2b2fd95
Compare
dbf85bf
to
7e6aaee
Compare
7cfbbc0
to
585d1f4
Compare
67cfefe
to
d9fe1c5
Compare
aaa26aa
to
2b3bac0
Compare
2b3bac0
to
c2484a3
Compare
704eedf
to
8a53c59
Compare
Decouples the Godot java entry point from the Android Fragment component. This enables the Godot component to be more easily reused across different types of Android components including Activities and Services.
8a53c59
to
29bbc17
Compare
YuriSizov
approved these changes
Jul 17, 2023
Thanks! |
3 tasks
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR sets the building blocks for a clean-up and re-architecture for the Godot Android platform integration.
The current architecture ties the
Godot.java
entry point to an Android Fragment component.This is an improvement over the previous architecture where it was tied to an Android Activity component as it enables us to composite UI rendered by Godot with UI rendered by other frameworks. However this also limits the use of Godot on Android to Fragment-based apps, limits control over Godot's lifecycle since it's coupled to the Fragment's lifecycle, and limits usage of Godot on Android to a single window (Godot 4 supports multiple windows).
This PR starts by decoupling the
Godot.java
entry point from the Android Fragment component. AGodotFragment
component is introduced to replicate the previous tied-to-Fragment lifecycle behavior and enable continuity for apps (including our own Godot Android Editor) that relies on that capability.The changes should be transparent to Godot Android apps and games generated from the Godot Editor, and as such it targets
Godot 4.1
, so we can validate the new architecture and address any issues.The work will continue in
Godot 4.2
where we'll leverage the new capabilities offered by the architecture to enable support for multiple windows on Android and accelerate startup times for Godot apps and games on Android by leveraging Android Services to preload and prewarm the Godot Engine.