-
-
Notifications
You must be signed in to change notification settings - Fork 99
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
Add "library" and "GameActivity" support for Android #7692
Comments
See #1473. This is already supported on Android, but it was unfortunately never documented and nobody is currently available to write this documentation. |
I started investigating it. I'm busy with other tasks though, so it would be better if someone else picked it up and finished. If [File -> Export... -> Android] doesn't have "export as a library" option then it most likely isn't fully implemented. Here's the beginning of a new documentation page that could replace all existing documentation pages on the subject of exporting for Android. (Having Godot only export library and have no capability of building APK/AAB is what I think is the ideal approach, since introduction of Title: Exporting for AndroidDescription: Learn how to include Godot in your Android project and how to have a releasable AAB/APK file.1. Learn how to include Godot in your Android project
2. Building APK/AABYou can build your APK/AAB directly from [File -> Export... -> Android] but this is no longer recommended because you won't be able to easily include any Java libraries in your project. Instead, it's better to include Android library of your Godot project in your own Android app and build APK/AAB with Android Studio. |
It can also fix some problems : |
maybe fixed (TouchScreenButton): godotengine/godot#83301 (comment) I think a port will be very high effort, more than 5000 lines of code. A few days ago I tried agdktunnel demo -> android_input_buffer In Godot, the TouchEvent are intercepted individually, processed and checked for "gestures" first, then collected in the |
Documentation available in https://docs.godotengine.org/en/stable/tutorials/platform/android/android_library.html |
Describe the project you are working on
A native Android app that wants to have:
Activity
with Android Studio UI elements and Godot 3D elements at the same time (on one screen).GameActivity
.Describe the problem or limitation you are having in your project
library
(it's anapplication
), like Unity does, which makes integrating into native Android applications either (1) impossible at all (I'm not sure if the Gradle template can be manually configured to make it alibrary
) or (2) time-consuming and complicated.GameActivity
for C++ 3D code: https://developer.android.com/games/agdk/game-activityDescribe the feature / enhancement and how it helps to overcome the problem or limitation
library
that can be fully independent and easily insertable into native Android applications.GameActivity
hold C++ of Godot, with an ability to extend it with overlayed custom UI elements.GameActivity
, so that native app integrators can understand this. Make a picture in the documentation that explains this like they have here: https://developer.android.com/games/agdk/game-activityDescribe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
It's best to see how Unity did it and do it the same way because their implementation worked for me out of the box the way I wanted:
- https://forum.unity.com/threads/introducing-gameactivity-for-android-in-2023-1.1409418/
- https://github.com/Unity-Technologies/uaal-example
If this enhancement will not be used often, can it be worked around with a few lines of script?
It can't be worked around.
Unity said in their post that they had to make C++ modifications in the engine to enable
GameActivity
support.Is there a reason why this should be core and not an add-on in the asset library?
library
and withGameActivity
is like the entry point for generating (2) more advanced Gradle projects and finally (3) APK/AAB.Point 1 from this chain is kind of missing in Godot currently and only 2 and 3 are present:
(1) Basic library project --> (2) More advanced Gradle project --> (3) APK/AAB
The text was updated successfully, but these errors were encountered: