Commit graph

516 commits

Author SHA1 Message Date
Rémi Verschelde
3870861056
Merge pull request #72106 from m4gr3d/fix_godot_android_editor_4_crash_after_running_game
Fix the issue causing the Godot Android Editor to crash when returning from the launched and running game
2023-01-26 15:58:12 +01: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
242ffb72b8 Address kotlin build warnings 2023-01-25 18:01:00 -08:00
Rémi Verschelde
3275428b1f
Merge pull request #71917 from m4gr3d/update_godot_android_editor_label
Update the Godot Android Editor name from `Godot Editor 4.x` to `Godot Editor 4`
2023-01-24 09:15:50 +01: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
84b8986a39
Merge pull request #71836 from m4gr3d/fix_godot_editor_cropping_main
Update the logic to calculate the screen scale on Android
2023-01-23 22:30:46 +01:00
bruvzg
daad4aed62
Cleanup and unify keyboard input.
- Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes.
- Unify IME behaviour, add inline composition string display on Windows and X11.
- Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events.
- Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS.
- Add support for media key handling on macOS.

Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-23 15:08:12 +02:00
Rémi Verschelde
5b1df48c6c
Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
Fredia Huya-Kouadio
da3e380240 Update the logic to calculate the screen scale on Android
Takes into account the ratio between the screen size and the default window dimensions.
2023-01-22 10:58:01 -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
Rémi Verschelde
6dc9629b45
Merge pull request #63483 from qianjunakasumi/qianjunakasumi/master
Introduce `appCategory` attribute of android to set category
2023-01-03 12:38:54 +01:00
千橘 雫霞
467b5f23a0
Introduce appCategory attribute of android to set category 2023-01-01 10:19:22 +08:00
Fredia Huya-Kouadio
da8b468074 Add boot splash for the Godot Android Editor 2022-12-16 10:49:28 -08:00
Fredia Huya-Kouadio
ec4de82ab3
Merge pull request #69990 from exoticorn/fix-android-touch-input
Fix ambiguous touch input events on Android
2022-12-14 18:23:17 -08:00
Dennis Ranke
408000752c handle ambiguous input events as touch events
there can be events can have both SOURCE_TOUCHSCREEN and SOURCE_STYLUS. handle them as touch events rather than mouse events.
2022-12-12 23:33:46 +01:00
Gilles Roudière
be1c9d677d Rename all gdnative occurences to gdextension
Non-exhaustive list of case-sensitive renames:

GDExtension -> GDNative
GDNATIVE -> GDEXTENSION
gdextension -> gdnative
ExtensionExtension ->Extension (for where there was GDNativeExtension)
EXTENSION_EXTENSION ->EXTENSION (for where there was GDNATIVE_EXTENSION)
gdnlib -> gdextension
gdn_interface -> gde_interface
gdni -> gde_interface
2022-12-12 11:04:57 +01:00
bruvzg
ecec415988
Use system fonts as fallback and improve system font handling.
Add support for font weight and stretch selection when using system fonts.
Add function to get system fallback font from a font name, style, text, and language code.
Implement system font support for Android.
Use system fonts as a last resort fallback.
2022-12-04 18:44:20 +02:00
Fredia Huya-Kouadio
2aba13e8fb Updating the minimum Android target api for proper Vulkan support 2022-11-30 11:16:59 -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
7cc47613fe Add missing display server overrides
Improves the base functionality for the Android platform and helps reduce the amount of spurious error logs emitted.
2022-11-27 22:07:51 -08:00
Fredia Huya-Kouadio
3c75887d41 Fix parsing of the keep_screen_on display setting 2022-11-17 05:54:05 -08:00
Rémi Verschelde
eb7c3e1ad3
Android: Fix parsing keep_screen_on setting
Boolean stringification changed in Godot 4.0.

Fixes #67034.

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-11-17 14:32:42 +01:00
Fredia Huya-Kouadio
5212d37040 Fix 'save & restart' logic for the Android Editor 2022-11-16 03:35:53 -08:00
Fredia Huya-Kouadio
151233b702 Upgrade Android gradle plugin to version 7.2.1 2022-11-10 16:35:50 -08:00
Fredia Huya-Kouadio
5f4a3e57de Small set of fixes to the input logic 2022-11-07 08:57:08 -08:00
Fredia Huya-Kouadio
13e4770b97 Add double_tap attribute to InputEventScreenTouch
This provides parity with the `InputEventMouseButton` allowing for proper conversion between the two events.
2022-10-22 07:30:46 -07:00
Fredia Huya-Kouadio
20d1c882cd Delete Android godot-lib with the old naming scheme
Update the `clean` task configuration: running `gradlew clean` will now properly delete the generated build artifacts
2022-10-18 20:36:40 -07:00
Fredia Huya-Kouadio
ea9bb98f26
Merge pull request #66946 from m4gr3d/cursor_shape_logic_cleanup_main
Cleanup of the Android cursor shape logic
2022-10-05 13:07:34 -07:00
Fredia Huya-Kouadio
ffe0e3970f Cleanup of the Android cursor shape logic 2022-10-05 11:57:57 -07:00
Fredia Huya-Kouadio
38113acf0d
Merge pull request #66941 from winterpixelgames/bugfix-android-null-input-event
Fix null in android keyboard handling.
2022-10-05 10:51:58 -07:00
Jason Knight
88df3e8d53 Fix null in android keyboard handling. 2022-10-05 11:17:02 -06:00
Fredia Huya-Kouadio
3178b042b3 Fix the gradle build configuration for the Android platform following https://github.com/godotengine/godot/pull/66242 2022-10-05 08:41:48 -07:00
clayjohn
4a1c7de57c Split rendering driver project setting into renderer_name and rendering_driver. To differentiate between a driver (e.g. Vulkan or D3D12) and a renderer (e.g. clustered or mobile renderer). 2022-09-19 10:26:10 -07: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
67b38d0ac2 Update the versioning logic for the Godot Android Editor
This is necessary to separate subsequent uploads to the Google Play store as each upload needs to increment the version code.
2022-09-12 09:47:07 -07:00
Rémi Verschelde
df5a356e6c Merge pull request #65501 from m4gr3d/fix_invalid_project_manager_path_main
Fix issue causing the project manager to crash because of missing path argument
2022-09-08 09:19:25 +02:00
Fredia Huya-Kouadio
cd544fd86b Fix issue causing the project manager to crash because of missing path argument
In the process, the initialization logic is updated to show an error message and gracefully close the engine when setup errors occur.
2022-09-07 14:21: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
1b3511ad49 Cleanup the Android input logic implementation 2022-09-07 13:30:10 -07:00
Aaron Franke
27b0f18275 Unify bits, arch, and android_arch into env["arch"]
Fully removes the `bits` option and adapts the code that relied on it.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-08-25 11:19:20 +02:00
Fredia Huya-Kouadio
b3117b6369 Fix issue preventing the Android Editor from displaying the project content
The issue was causing by a bug within the logic for `FileAccessFilesystemJAndroid#eof_reached()` causing that value to remain false after the eof was reached.
This in turn caused an infinite loop in the file scanner preventing the project's content from showing up.
2022-08-15 02:22:10 -07:00
Rémi Verschelde
557c16bb88
Merge pull request #62885 from madmiraal/fix-59931 2022-08-08 15:53:48 +02:00
Brian Semrau
103c0fa6e6 Add support for multiple virtual keyboard types 2022-08-04 10:41:33 -04:00
Fredia Huya-Kouadio
9679c67904 Address remaining scoped storage regressions
- Accelerate common path used to check the storage scope for a given path
- Update the logic for the `get_as_text()` method - previous logic loads the content of a text file one byte at a time
2022-07-26 07:44:08 -07:00
Marcel Admiraal
6661141c21 Fix incorrect Android scancodes 2022-07-13 16:24:01 +01: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
Rémi Verschelde
898e09e2e6
Merge pull request #61691 from madmiraal/android-ndk-23
Upgrade Android NDK to r23 LTS
2022-06-26 21:23:23 +02:00
Fredia Huya-Kouadio
6a7471b204
Merge pull request #62289 from madmiraal/fix-61816
Remove broken scroll gesture on Android
2022-06-25 18:48:14 -07:00
Marcel Admiraal
48efd563e4 Upgrade Android NDK to r23 LTS 2022-06-25 14:58:30 +01: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
Marcel Admiraal
076638f13b Remove broken scroll gesture on Android 2022-06-21 17:14:20 +01:00
Marcel Admiraal
806e7d18d1 Ensure joystick has been added or not already removed when processing input 2022-06-16 18:15:25 +01:00
Fredia Huya-Kouadio
6b9a81900e Migrate the Godot Editor java source file to Kotlin. 2022-06-09 13:26:24 -07:00
Rémi Verschelde
cd7871867f
Merge pull request #61579 from madmiraal/android-kotlin-java-version
Ensure Android Java and Kotlin compile to the same version
2022-06-01 18:31:09 +02:00
Marcel Admiraal
b19bbadcf0 Ensure Android Java and Kotlin compile to the same version 2022-06-01 16:23:44 +01: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
Marcel Admiraal
d0cb299f04 Only use Android fullscreen theme for splash screen 2022-05-27 16:54:44 +02:00
Rémi Verschelde
3bee0689bc
Merge pull request #61333 from m4gr3d/fix_restart_logic_main 2022-05-23 23:11:53 +02:00
Fredia Huya-Kouadio
d38ffda2c3 Fix the logic to restart the Godot application 2022-05-23 13:15:48 -07:00
Marcel Admiraal
cf0f967e6d Remove duplicate Android sensor listener registrations 2022-05-23 20:33:13 +02:00
Rémi Verschelde
3894b08d0d
Merge pull request #60553 from madmiraal/separate-display_safe_area 2022-05-03 11:20:46 +02:00
Rémi Verschelde
d56462d82a
Merge pull request #60638 from m4gr3d/support_hand_tracking_v2_main 2022-05-02 09:51:21 +02:00
Marcel Admiraal
97e87a2daf Fix screen_get_usable_rect returning display safe area 2022-05-02 09:31:32 +02:00
Rémi Verschelde
bc7ccc909b
Merge pull request #60551 from madmiraal/implement-3466
Add a method for obtaining display cutouts on Android
2022-05-02 07:56:41 +02:00
Rémi Verschelde
cbdc33bcf7
Merge pull request #60563 from madmiraal/fix-60562 2022-04-29 00:30:30 +02:00
bruvzg
6ab672d1ef Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and Windows.
Implement TextServer word break method.
2022-04-28 14:35:41 +03:00
Fredy Huya-Kouadio
c63ca6c72b Update Meta hand tracking version
https://developer.oculus.com/blog/presence-platforms-hand-tracking-api-gets-an-upgrade/
2022-04-27 20:56:24 -07:00
Marcel Admiraal
5924e2b90e Check for null when retrieving clip data item text on Android 2022-04-27 16:12:33 +02:00
Marcel Admiraal
71ce5857ec Add a method for obtaining display cutouts on Android 2022-04-26 13:51:21 +02:00
Rémi Verschelde
d9f7da2230
Merge pull request #60433 from madmiraal/remove-superfluous-null-check
Remove superfluous null check
2022-04-25 16:02:40 +02:00
Rémi Verschelde
b4a1a76bce
Merge pull request #60457 from madmiraal/replace-index-iterators
Replace index iterators with for each loops.
2022-04-25 16:02:28 +02:00
Rémi Verschelde
5e599d7c22
Merge pull request #60441 from madmiraal/remove-superfluous-inputmanager
Remove superfluous Android InputManager interface and implementation
2022-04-25 15:41:55 +02:00
Marcel Admiraal
334ebd7eb7 Replace index iterators with for each loops. 2022-04-23 09:45:44 +02:00
Marcel Admiraal
2f225bf2c5 Remove superfluous check for minimum Android SDK. 2022-04-22 18:55:45 +02:00
Marcel Admiraal
22ca5b2eba Remove superfluous Android InputManager interface and implementation 2022-04-22 18:52:06 +02:00
Marcel Admiraal
988432b8bb Remove superfluous null check 2022-04-22 17:33:27 +02: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
Fredia Huya-Kouadio
b176b31f5d Fix flickering issues with low processor mode on Android 2022-03-29 12:17:09 -07:00
Fredy Huya-Kouadio
5711037bf6 Android port of the Godot Editor
These set of changes focus primarily on getting the core logic and overall Godot Editor UI and functionality up and running natively on Android devices.
UI tweaks / cleanup / polish, as well configuration for Android specific functionality / restrictions will be addressed in follow-up PRs iteratively based on feedback.

Co-authored-by: thebestnom <shoval.arad@gmail.com>
2022-03-28 14:04:51 -07:00
Fredia Huya-Kouadio
a2bf47de2b Setup logic to publish the Godot Android library to MavenCentral 2022-03-14 14:53:39 -07:00
Rémi Verschelde
9b05f29894 Remove unused GDNative code
This has been superseded by GDExtension so this code is no longer useful
nor usable.

There's still some GDNative-related stuff in platform export code which
needs to be adapted for GDExtension (e.g. to include GDExtension libraries
in exports).
2022-03-09 13:59:03 +01:00
Rémi Verschelde
b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
jordi
54dec44dba Add screen_get_refresh_rate to DisplayServer 2022-02-03 21:50:32 -06:00
Fredia Huya-Kouadio
b284dd92d3 Fix XR Android manifest metadata
- Adds the parameters for supported Meta devices, which is required to access some device specific capabilities
- Remove the 'com.samsung.android.vr.application.mode' metadata
2022-01-26 09:05:47 -08:00
Haoyu Qiu
314f309035 Add DisplayServer.clipboard_has() to check clipboard content 2022-01-19 23:44:20 +08:00
Rémi Verschelde
ba2bdc478b
Style: Remove inconsistently used @author docstrings
Each file in Godot has had multiple contributors who co-authored it over the
years, and the information of who was the original person to create that file
is not very relevant, especially when used so inconsistently.

`git blame` is a much better way to know who initially authored or later
modified a given chunk of code, and most IDEs now have good integration to
show this information.
2022-01-04 20:42:50 +01:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
ne0fhyk
1345e66935 Fix Android Studio builds. 2021-12-21 07:41:12 -08:00
Marcel Admiraal
6e38fc4b80 Only rotate Android sensor values for sensors that need them rotated 2021-12-15 18:15:08 +00:00
Rémi Verschelde
89b8de71c0
Merge pull request #55767 from m4gr3d/config_hand_tracking_frequency_master 2021-12-09 23:04:41 +01:00
Rémi Verschelde
e3b0282080
Merge pull request #55759 from m4gr3d/enable_exclude_from_recents_master 2021-12-09 23:03:10 +01:00
ne0fhyk
862c0d06fb Add support for configuring the xr hand tracking frequency mode 2021-12-09 12:25:48 -08:00
Fredia Huya-Kouadio
cfa81ff32a Enable configuration of the android:excludeFromRecents activity attribute. 2021-12-09 08:50:47 -08:00
Fredia Huya-Kouadio
2e7e6502dd Add configs to specify the min and target sdk versions. 2021-12-08 09:13:07 -08:00
Rémi Verschelde
c038768379
Merge pull request #55159 from m4gr3d/add_oculus_openxr_config_master 2021-11-22 10:28:06 +01:00
Marcel Admiraal
2fa4c6498a Fix Android get_screen_orientation() not returning valid values 2021-11-21 12:05:25 +00:00
Fredia Huya-Kouadio
882ec0d611 Add support for OpenXR export configurations. 2021-11-20 06:10:44 -08:00
Pedro J. Estébanez
cab870e9d3 Drop pointless Android depth buffer setting 2021-11-15 11:02:01 +01:00
Rémi Verschelde
8a15e404b2
Merge pull request #54463 from RandomShaper/fix_gl3_32bits 2021-11-09 11:55:26 +01:00