Commit Graph

51 Commits

Author SHA1 Message Date
Fredia Huya-Kouadio 77202e08b4 Update the set of excluded permissions for the XR Editor
A few permissions including the `USE_SCENE` permission are being renamed with the launch of the Meta Spatial SDK, so we update the excluded list to avoid requesting them on app start.
2024-09-25 23:22:16 -07:00
Fredia Huya-Kouadio 741efa632a Update the Android editor flavors to avoid vendor-specific references 2024-09-13 08:53:29 -07:00
Rémi Verschelde f33a81977b
Merge pull request #96742 from m4gr3d/check_openxr_automatic_permissions_request
[Android editor] Limit when OpenXR runtime permissions are requested
2024-09-12 09:17:51 +02:00
Fredia Huya-Kouadio 3ff95ef12a Only request OpenXR permissions for a XR game running off the Android editor when the `xr/openxr/extensions/automatically_request_runtime_permissions` project setting is enabled 2024-09-11 14:47:08 -07:00
devloglogan 16e1d8a81b Disable some editor settings by default in the XR Editor 2024-09-09 07:15:15 -05:00
Fredia Huya-Kouadio 9dc0543da7 Improve support for XR projects 2024-09-06 00:35:50 -07:00
Fredia Huya-Kouadio 11d4df4bc3 Update the options for launching the Play window in PiP mode 2024-08-30 10:31:33 -07:00
Fredia Huya-Kouadio 923b0f2e56 Restore 'Toggle fullscreen' menu for the Android editor and clean up the immersive mode logic 2024-08-28 09:50:34 -07:00
Fredia Huya-Kouadio 961394a988 Add support for launching the Play window in PiP mode 2024-08-28 03:18:51 -07:00
Fredia Huya-Kouadio 6a9c060883 Add support to the Android editor for signing and verifying Android apks
- Apk signing and verification is enabled using the apksig library from ac5cbb07d8
2024-08-26 11:38:49 -07:00
Fredia Huya-Kouadio a5897d579b Update the `GodotHost` interface to support signing and verifying Android apks
Update the export logic to enable apk generation and signing for Android editor builds

Note: Only legacy builds are supported. Gradle builds are not supported at this point in time.
2024-08-26 11:16:38 -07:00
Fredia Huya-Kouadio 4d0da74014 Fix the cleanup logic for the Android render thread
On Android the exit logic goes through `Godot#onDestroy()` who attempts to cleanup the engine using the following code:

```
runOnRenderThread {
	GodotLib.ondestroy()
	forceQuit()
}
```

The issue however is that by the time we ran this code, the render thread has already been paused (but not yet destroyed), and thus `GodotLib.ondestroy()` and `forceQuit()` which are scheduled on the render thread are not executed.

To address this, we instead explicitly request the render thread to exit and block until it does. As part of it exit logic, the render thread has been updated to properly destroy and clean the native instance of the Godot engine, resolving the issue.
2024-07-24 10:17:46 -07:00
Fredia Huya-Kouadio 5e59819727 Cleanup Android input on render thread settings
Follow up to https://github.com/godotengine/godot/pull/93933
Clean up the set of settings use to control whether Android input should be dispatched on the render thread.

Addresses comments in https://github.com/godotengine/godot/pull/93933#issuecomment-2210437977
2024-07-09 09:15:18 -07: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 dd966f5680 Configure the splash screen for the Android editor 2024-06-10 00:34:00 -07:00
Fredia Huya-Kouadio 0795587f69 Consolidate the ProjectManager and Editor windows into a single Android Activity class. 2024-06-02 14:14:21 -07:00
Rémi Verschelde 7d03b1de0b
Style: Trim trailing whitespace and ensure newline at EOF
Found by apply the file_format checks again via #91597.
2024-05-08 10:12:46 +02:00
melquiadess 73908bbce2 Remove redundant semicolons from Kotlin/gradle files 2024-04-02 23:31:34 +01: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 df4f9e8e64 Disable automatic permissions request
The feature was added in Godot 4.2, but it goes against recommended best practices for permissions request, as such it's being reverted.
In its place, developers now have to explicitly request the permissions they need to access.
2024-01-11 08:04:09 -08:00
Fredia Huya-Kouadio 7cd604132b Fix an issue causing the running project window to loop-restart when closed with the back button 2023-11-27 23:43:19 -08:00
Fredia Huya-Kouadio fcb07ff8dc Fix Android editor crash issue
Fix issue causing the Android editor to crash when pressing back from a running project
2023-11-03 07:37:46 -07:00
Bastiaan Olij 9e56e7a3ce Add support for the OpenXR Eye gaze interaction extension
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
2023-10-02 14:02:23 -07:00
Rémi Verschelde 5b5471e30a
Merge pull request #78908 from zorbathut/pr_gitignore
Add static check for overzealous .gitignores and fix an example of such.
2023-08-29 12:41:53 +02: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
Ben Rog-Wilhelm 90f3992036 Fix: incorrectly .gitignored files. 2023-07-01 08:41:15 -05: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
Fredia Huya-Kouadio a951a14b16 Fix issue causing the last edited project to open while switching to another one.
Fixes https://github.com/godotengine/godot/issues/76562
2023-06-11 22:29:35 -07:00
Fredia Huya-Kouadio b2cd6a8a95 Add setting to control the window used to run the project for the Android editor
The follow options were added to the (new) `run/window_placement/android_window` editor setting:

- `Same as Editor`: run the project in the same window as the editor
- `Side-by-side with Editor`: run the project in an adjacent window to the editor
- `Auto`: choose how to run the project based on the device screen size
2023-06-07 18:32:52 -07:00
Fredia Huya-Kouadio 8ca14183f0 Fix issue causing the Android editor to crash when creating a new AudioStreamMicrophone
Fixes https://github.com/godotengine/godot/issues/73801
2023-05-31 00:58:27 -07:00
Rémi Verschelde 094e88416a
Merge pull request #74569 from m4gr3d/setup_play_store_builds_main
Update the gradle build tasks to generate play store builds
2023-05-24 10:53:17 +02:00
Fredia Huya-Kouadio 831b4a5366 Improve startup benchmarking
Move the benchmarking measuring methods from `Engine` to `OS` to allow for platform specific overrides (e.g: can be used to hook into platform specific benchmarking and tracing capabilities).
2023-05-23 13:22:35 -07:00
Fredia Huya-Kouadio 0d569bea5d Update the gradle build tasks to generate play store builds.
Configure the gradle builds to sign and build the release version of the Godot Android Editor
2023-04-27 22:08:55 -07:00
Fredia Huya-Kouadio 445053a62d Enable granular control of touchscreen related settings 2023-02-22 00:16:39 -08:00
Fredia Huya-Kouadio 9d83e807e7 Downgrade the vulkan abort logic to a warning
This addresses issues where some drivers are reporting they don't meet the vulkan hardware level 1 support requirements even though they render as expected when the check is removed.
2023-02-07 16:16:58 -08:00
Fredia Huya-Kouadio ec4d720850 Fix the issue causing the Godot Android Editor to crash when returning from the launched and running game
The issue was caused because the running game pid was not set, and thus had a value of `0`. When trying to stop the running game, the `EditorRun::stop()` logic would kill the process with pid 0, which on Android corresponds to the running app's own process, thus causing the editor to crash.
This issue did not happen on Godot 3 because pid with value of `0` are not considered valid.
2023-01-26 02:59:39 -08:00
Fredia Huya-Kouadio 6b400d2fd1 Update the Godot Android Editor name from `Godot Editor 4.x` to `Godot Editor v4` 2023-01-23 14:04:05 -08:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Fredia Huya-Kouadio da8b468074 Add boot splash for the Godot Android Editor 2022-12-16 10:49:28 -08:00
clayjohn 9141984e7e Enable GLES3 on Android
Add necessary build flags and switch from using a
GLES2 context to a GLES3 one.

This also enables building for OpenXR

Co-authored-by: m4gr3d <fhuyakou@gmail.com>
Co-authored-by: dsnopek <dsnopek@gmail.com>
2022-11-29 14:18:24 -08:00
Fredia Huya-Kouadio 5212d37040 Fix 'save & restart' logic for the Android Editor 2022-11-16 03:35:53 -08:00
Fredia Huya-Kouadio 1efafa9dfe Exclude small screens from the set of supported devices. 2022-09-12 09:47:34 -07:00
Fredia Huya-Kouadio c3c0bea615 Enable long press, pan and scale gestures for the Godot Android Editor
Fix the bug causing the editor to crash when running the project.
2022-09-07 13:30:10 -07:00
Fredia Huya-Kouadio f9c19298ce Add full support for Android scoped storage.
This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer.
This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
2022-07-05 03:00:37 -07:00
Gustavo Maciel ec6d5d6cba Update android:targetSdkVersion from 30 to 31
Starting in August 2022, new apps will need to target API level 31 (Android 12) or higher and adjust for behavioral changes.

Read more here: https://developer.android.com/google/play/requirements/target-sdk
2022-06-23 15:17:15 +02:00
Fredia Huya-Kouadio 6b9a81900e Migrate the Godot Editor java source file to Kotlin. 2022-06-09 13:26:24 -07:00
Fredia Huya-Kouadio 6f7ec7f723 Misc editor tweaks and polishes:
- Using a bucketized approach to select the editor scale in order to avoid too high values
- Add default app dimensions: used on Android devices with free floating app windows to set the default app frame
- Add ability to launch the Game window in an adjacent frame when in multi window mode
2022-05-31 23:49:40 -07:00
Fredia Huya-Kouadio 8eabf77f54 Update the editor display scale based on the device's scaled density 2022-04-04 09:23:43 -07:00
Fredia Huya-Kouadio 3f299e9255 Update `resize` settings:
- Unlock resizing for the Godot Editor
- Add an option to specify whether a game is resizeable for the Godot template
2022-04-04 01:02:10 -07:00