1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Use implicit launch when running a Godot Android project from the editor

This allows developers to override the default launching activity (`com.godot.game.GodotApp`) with a custom one if desired.
Logic is added to fallback to the default launching activity if the implicit launch fails.
This commit is contained in:
Fredia Huya-Kouadio
2025-01-13 08:52:17 -08:00
parent d79ff848fa
commit 17279cdf45
2 changed files with 37 additions and 6 deletions

View File

@@ -260,7 +260,7 @@ String _get_screen_sizes_tag(const Ref<EditorExportPreset> &p_preset) {
String _get_activity_tag(const Ref<EditorExportPlatform> &p_export_platform, const Ref<EditorExportPreset> &p_preset, bool p_debug) {
String orientation = _get_android_orientation_label(DisplayServer::ScreenOrientation(int(GLOBAL_GET("display/window/handheld/orientation"))));
String manifest_activity_text = vformat(
" <activity android:name=\"com.godot.game.GodotApp\" "
" <activity android:name=\".GodotApp\" "
"tools:replace=\"android:screenOrientation,android:excludeFromRecents,android:resizeableActivity\" "
"tools:node=\"mergeOnlyAttributes\" "
"android:excludeFromRecents=\"%s\" "