Commit graph

144 commits

Author SHA1 Message Date
Fredia Huya-Kouadio
2f4c3d411c Address API 35 UI behavior changes
- Fix issue on foldable where the embedded window would obscure the main window when launching
- Fix edge-to-edge support for non-immersive apps / games
- Add edge-to-edge export option to allow non-immersive apps / games to extend edge to edge
2025-06-20 13:29:38 -07:00
Anish Mishra
dcab8a721e Revert "Add support for exporting to Google Play Instant"
This reverts commit 12ad9ed4e0.

Shortly after the feature was merged, we received news that Google will shut down Instant Apps in December 2025. Since this feature is being discontinued soon, there’s no value in keeping it for just a few months.
2025-06-14 15:51:08 +05:30
Fredia Huya-Kouadio
dc589e239c Add support for using an Android Service to host the Godot engine
- Provide a `GodotService` Android service implementation which can be used to host an instance of the Godot engine
- Provide a `RemoteGodotFragment` Android fragment implementation which provides the view and logic to wrap connection to a `GodotService` instance
2025-06-12 16:37:38 -07:00
Rémi Verschelde
ae33da972b
Merge pull request #106709 from m4gr3d/fix_transparency_flags
Fix transparency background issue on Android
2025-06-12 23:32:44 +02:00
Rémi Verschelde
4adef85151
Merge pull request #106447 from kojurohan42/instant-build
Add support for exporting to Google Play Instant via Google Play Instant Export Option
2025-06-12 23:32:38 +02:00
Fredia Huya-Kouadio
547450befd Fix transparency background issue on Android
Fixes https://github.com/godotengine/godot/issues/106703
2025-06-02 22:45:16 -07:00
kojurohan42
12ad9ed4e0 Add support for exporting to Google Play Instant 2025-05-23 22:00:14 +05:45
Anish Mishra
0312a0cc9e Android: Add export option for custom theme attributes
- Regenerates the `GodotAppMainTheme` and `GodotAppSplashTheme` during Android export. Any manual changes to these styles will be cleared and replaced with default theme attributes.

- Adds a new export option `gradle_build/custom_theme_attributes` for injecting custom theme attributes directly via the export window, avoiding the need to manually modify themes.xml.
2025-05-23 20:00:47 +05:30
Thaddeus Crews
7951a1bb87
Merge pull request #106359 from m4gr3d/remove_compress_native_libs_option
Remove the `gradle_build/compress_native_libraries` export option
2025-05-21 09:06:25 -05:00
Fredia Huya-Kouadio
ec7fb37db1 Update to the AAB directory layout
Follow-up to https://github.com/godotengine/godot/pull/106152 to address the regression described in https://github.com/godotengine/godot/issues/106582
2025-05-19 10:50:43 -07:00
Fredia Huya-Kouadio
773fc96ab2 Update the logic to validate the java version
Loosen the check to allow Java version >= 17
2025-05-15 16:28:07 -07:00
Fredia Huya-Kouadio
e3d60bbd0c Remove the option to compress Android native libraries
Follow-up to https://github.com/godotengine/godot/pull/106358, this is a separate commit / PR since it shouldn't be cherry-picked in previous releases as it removes existing functionality.

Support for 16kb page size added in the previous PR requires the native libraries to be uncompressed, so we're deprecating and removing the option to compress native libraries.
See https://developer.android.com/guide/practices/page-sizes#agp_version_851_or_higher for more details.
2025-05-15 08:41:46 -07:00
Fredia Huya-Kouadio
27bdc86ed1 Bump the NDK to version 28.1.13356709
Doing so automatically adds support for 16kib page to the Godot Android shared libraries.
See https://developer.android.com/guide/practices/page-sizes#compile-16-kb-alignment for details.
2025-05-13 08:27:36 -07:00
Fredia Huya-Kouadio
c29545f793 Bump the minimum supported SDK version to 24
Raise the minimum supported Android version from Android 5 (Lollipop) to Android 7 (Nougat).
2025-05-08 09:45:32 -04:00
Fredia Huya-Kouadio
4b4144cc39 Annual versions bump for the Android platform
- gradle: 8.2 -> 8.11.1
- androidx.constraintlayout:constraintlayout: 2.1.4 -> 2.2.1
- Android gradle plugin: 8.2.0 -> 8.6.1
- Android compile sdk: 34 -> 35
- Android target sdk: 34 -> 35
- Android build tools: 34.0.0 -> 35.0.0
- kotlin: 1.9.20 -> 2.1.20
- androidx.fragment:fragment: 1.7.1 -> 1.8.6
- OpenXR vendors plugin: 3.1.2-stable -> 4.0.0-stable
2025-05-07 13:14:49 -04:00
Fredia Huya-Kouadio
fac2ebed78 Update the project NDK to the latest LTS version (r27c) 2025-04-22 19:43:59 -07:00
Fredia Huya-Kouadio
8a514ae56f Enable native debug symbols generation 2025-04-22 09:04:49 -07:00
Fredia Huya-Kouadio
845c925b67 Add support for export plugins to modify the Android prebuilt manifest 2025-03-14 16:05:09 -07:00
Alex
1c02316365 Fix crash after changing device language
The app was restarting unexpectedly due to missing configChanges flags.
Added "locale|layoutDirection" to AndroidManifest.xml to prevent activity recreation.
2025-03-01 02:42:56 +01:00
Fredia Huya-Kouadio
8ed8b4a89d Bump the version of the openxr vendors plugin dependency 2025-02-12 09:51:07 -08:00
Thaddeus Crews
c90fd7f3da
Merge pull request #98066 from TCROC/fix-android-mono-export
Fix Android mono export with 2 or more cpu architectures fails
2025-02-10 12:21:32 -06:00
Travis Lange
5e2fd7b1d7 fix android mono export causing conflicts 2025-02-10 10:09:52 -05:00
Fredia Huya-Kouadio
9e4365f1a7 Export the rendering/renderer/rendering_method.mobile project setting to the AndroidManifest
The AndroidManifest already stores the Godot editor and library versions. The addition of this meta-data allows to identify Godot Android apps that may be subject to renderer specific issues addressed in future versions of the engine.
2025-02-04 21:11:56 -08:00
Thaddeus Crews
ff706b8fb8
Merge pull request #100756 from raulsntos/android/fix-aab-path
[Android] Fix path to AAB in copyAndRenameBinary task
2024-12-23 11:15:08 -06:00
Raul Santos
d380cb1a6c
[Android] Fix path to AAB in copyAndRenameBinary task 2024-12-22 22:40:36 +01:00
Anish Mishra
5d8e2cd63f Add option to disable Swipe-to-Dismiss for Wear OS 2024-12-20 23:21:50 +05:30
Raul Santos
d526d523b4
[.NET] Fix gradle builds for multiple ABIs
Include the needed .NET jar in the Godot templates so it's always available, then we don't need to include the jar from a .NET publish which could fail when exporting to multiple architectures because it would attempt to add the same jar for each architecture.
2024-12-13 08:01:13 +01:00
Anish Mishra
6fd8d7b634 Android: Update exported app and editor theme 2024-11-08 22:37:52 +05:30
Fredia Huya-Kouadio
4587d14796 Add logic to automatically pick up jar/aar library dependencies in the res://addons directory 2024-09-29 14:32:10 -07:00
Raul Santos
0aa46e19c5
C#: Fallback to CoreCLR/MonoVM hosting APIs when hostfxr/NativeAOT fails
Some platforms don't support hostfxr but we can use the coreclr/monosgen library directly to initialize the runtime.

Android exports now use the `android` runtime identifier instead of `linux-bionic`, this removes the restrictions we previously had:
- Adds support for all Android architectures (arm32, arm64, x32, and x64), previously only the 64-bit architectures were supported.
- Loads `System.Security.Cryptography.Native.Android` (the .NET library that binds to the Android OS crypto functions).
2024-09-16 17:07:03 +02:00
Fredia Huya-Kouadio
9dc0543da7 Improve support for XR projects 2024-09-06 00:35:50 -07:00
Rémi Verschelde
690c5669e2
Merge pull request #91271 from m4gr3d/clean_gradle_build_setup
Clean up the gradle build logic used to generate the Godot Android binaries
2024-08-16 10:33:19 +02:00
Fredia Huya-Kouadio
6b6428d779 Fix ANRs reported by the Google Play Console
- Add support for dispatching input on the render thread (UI thread is the current default) when `input_buffering` and `accumulated_input` are disabled. At the expense of latency, this helps prevent 'heavy' applications / games from blocking the UI thread (the default behavior)  which may cause the application to ANR.

- Remove GLSurfaceView logic causing the UI thread to wait on the GL thread during lifecycle events. The removed logic would cause the UI thread to ANR when the GL thread is blocked.
2024-07-04 05:18:50 -07:00
Fredia Huya-Kouadio
c6a23a7a7d Fix crashes reported by the Google Play Console 2024-07-04 02:46:11 -07:00
Fredia Huya-Kouadio
f20e21a6d6 Update the splash screen logic for the Godot app template
Due to limitations to the splash screen introduced in Android 12, the splash screen logic is updated to the same logic as used on other platforms, i.e: the splash screen is rendered by the Godot engine instead of the Android runtime.
2024-06-10 00:59:36 -07:00
Fredia Huya-Kouadio
dd966f5680 Configure the splash screen for the Android editor 2024-06-10 00:34:00 -07:00
Fredia Huya-Kouadio
d38c5b6737 Clean up the build commands used by the editor for gradle builds 2024-05-31 06:21:16 -07:00
Mauricio Narvaez
28f357733f Ensure that Godot's version of libc++_shared.so is always selected in case dependencies have their own 2024-05-29 14:43:35 -07:00
Emre Kultursay
3b8d0bee4a Fix detecting when Gradle is invoked from Studio
The existing 'idea.platform.prefix' system-property approach
only worked because of a Android Studio bug that leaks the
system properties from Android Studio into Gradle build:
  - https://issuetracker.google.com/201075423

This bug was fixed in Android Studio 2023.3.1 (Jellyfish).

The correct way of identifying builds from Android Studio is to
use the following project property (not system property):
 - android.injected.invoked.from.ide
2024-05-20 17:02:36 -07:00
Fredia Huya-Kouadio
1cc935fa6c Fix issue causing the copyAndRename* task to fail on occasions on Windows machines
Gradle automatically handles up-to-date checks for output files and directories. This behavior sometimes causes the `copyAndRename*` task to fail on Windows machines when gradle tries to check on existing files in the output directories it doesn't have access to.
To fix the issue, we disable this gradle behavior following the instructions in https://docs.gradle.org/8.2/userguide/incremental_build.html#sec:disable-state-tracking
2024-04-17 08:38:32 -07:00
melquiadess
73908bbce2 Remove redundant semicolons from Kotlin/gradle files 2024-04-02 23:31:34 +01:00
Fredia Huya-Kouadio
a69a585c91 Add export setting to specify whether the native libraries should be compressed for the gradle build 2024-02-15 18:04:55 -08:00
Fredia Huya-Kouadio
f1887a30f3 Fix gradle build errors when the build path contains non-ASCII characters 2024-02-13 14:31:08 -08:00
Fredia Huya-Kouadio
e04a38775b Update Android dependencies for the project
- Update Android gradle plugin version from 7.2.1 to 8.2.0
- Update gradle version from 7.4.2 to 8.2
- Update target SDK from 33 to 34
- Update build tools version from 33.0.2 to 34.0.0
- Update kotlin version from 1.7.0 to 1.9.20
- Update Android fragment version from 1.3.6 to 1.6.2
- Update AndroidX window version from 1.0.0 to 1.2.0
2024-01-18 10:35:32 -08:00
Fredia Huya-Kouadio
85e98ef009 Specify the path to the Java SDK used for the Android gradle build
Introduce an editor setting to allow users the ability to specify the path to the Java SDK used for the Android gradle build.
2024-01-18 09:19:37 -08:00
Fredia Huya-Kouadio
14428c8d5b Update the launchMode for the GodotApp activity to allow other activities to be part of the same task
For details, see https://developer.android.com/guide/topics/manifest/activity-element#lmode
2023-10-25 08:27:35 -07:00
Fredia Huya-Kouadio
56ce2d94c5 Bump the java version to version 17 2023-10-17 15:08:03 -07:00
Fredia Huya-Kouadio
63d47dced0 Add export setting to control whether to show the Godot app in the app library 2023-08-13 09:54:10 -04:00
Fredia Huya-Kouadio
29bbc17b48 Godot Android re-architecture
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.
2023-07-16 18:56:58 -07:00
Fredia Huya-Kouadio
0664f5ec3b Add parameters for the Godot Activity starting intent to allow restarting or force-quitting the engine
Follow-up code cleanup for https://github.com/godotengine/godot/pull/78129
2023-06-15 21:41:49 -07:00