Commit Graph

578 Commits

Author SHA1 Message Date
Rémi Verschelde
de8a05f447
Merge pull request #92965 from m4gr3d/fix_splash_screen
Update the Android splash screen logic
2024-06-13 17:19:27 +02:00
Tareq Anuar
d14bea4413
Move the most specific motion event guard to the top of the function. 2024-06-11 12:10:09 +08: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
Rémi Verschelde
62b15238e5
Merge pull request #92704 from m4gr3d/update_android_editor_activity_layout
Consolidate the ProjectManager and Editor windows into a single Android Activity class
2024-06-04 10:10:08 +02:00
Fredia Huya-Kouadio
53279d2510 Fix invalid return value when multiple permission requests are dispatched 2024-06-02 17:22:51 -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
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
Rémi Verschelde
a6ef250f3e
Merge pull request #92133 from m4gr3d/fix_touch_input
Fix invalid detection of mouse input
2024-05-29 23:03:27 +02:00
Rémi Verschelde
0e39ac6ac6
Merge pull request #92176 from emrekultursay/master
Fix detecting when Gradle is invoked from Studio
2024-05-21 11:23:08 +02: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
Alexander Hartmann
ab9e377fe6 Fix InputEventScreenDrag on Android 2024-05-21 01:04:23 +02:00
Fredia Huya-Kouadio
5a74e5812b Add logic to unregister the Godot plugins on engine termination 2024-05-19 19:27:04 -07:00
Fredia Huya-Kouadio
625b92e3cd Input logic cleanup:
- Fix invalid detection of mouse input. Prioritize using the event tool type to detect the type of the event, and only use the event source as fallback.

- Ensure that pressure and tilt information is passed for touch drag events

- Consolidate logic and remove redundant methods

- Improve the logic to detect when external hardware keyboards are connected to the device
2024-05-19 14:08:01 -07:00
Fredia Huya-Kouadio
ab4fbbcaa7 Switch to the WindowInsetsAnimationCompat api
Replace the use of WindowInsetsAnimation with WindowInsetsAnimationCompat; the former was only introdcued in api 30 and caused a crash on older versions of Android.

Fixes https://github.com/godotengine/godot/issues/91773
2024-05-13 00:59:03 -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
Radiant
789c6ebdfd Implement amplitude to Input.vibrate_handheld
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: m4gr3d <m4gr3d@users.noreply.github.com>
2024-05-02 19:09:42 +03:00
Fredia Huya-Kouadio
3a06b447cc Cleanup Android file errors
Follow up to https://github.com/godotengine/godot/pull/90403
2024-04-22 07:48:45 -07:00
Rémi Verschelde
6cf03a5bbb
Merge pull request #90802 from m4gr3d/fix_android_gradle_build_copy_rename_permissions_error
Fix issue causing the `copyAndRename*` task to fail on occasions on Windows machines
2024-04-22 12:52:56 +02: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
bruvzg
88b3e68f93
[FileAccess] Implement resize method. 2024-04-12 19:20:49 +03:00
melquiadess
f09d033156 Improve performance by extracting windowManager and getRotatedValues()
Once sensor listeners are registered, onSensorChanged() (and subsequently
getRotatedValues()) gets called multiple times per socond. Obtaining
WindowManager on each of those calls is superfluous and can be avoided
by extracting it to a lazy class val. getRotatedValue() can also be
called before checking sensor type, and used for each one of them,
resulting in less code repetition.
2024-04-04 14:17:28 +01:00
Rémi Verschelde
82dd9b9916
Merge pull request #90147 from melquiadess/remove-redundant-semicolons
Android: Remove redundant semicolons from Kotlin/gradle files
2024-04-04 14:37:31 +02:00
Rémi Verschelde
c7606354c6
Merge pull request #90146 from melquiadess/extract-command-line-file-parsing-and-add-unit-tests
Android: Extract parsing command line file to a separate class + add unit tests
2024-04-04 14:37:28 +02:00
melquiadess
839600b744 Extract parsing command line file to a separate class + add unit tests 2024-04-04 10:18:57 +01:00
melquiadess
73908bbce2 Remove redundant semicolons from Kotlin/gradle files 2024-04-02 23:31:34 +01:00
melquiadess
70ea3e22a6 Use ?. (and ?.let) safe operators instead of !!
This PR prevents potential NPEs, and follows Kotlin conventions more closely
by replacing the unsafe !! operator with safe ?. (or ?.let) (usually
!! would only be used very rarely, and with a good reason - there is one
place left in this PR where !! makes sense), and by replacing Java style
'if (x != null)' with Kotlin's '?.'
2024-03-28 23:36:38 +00:00
Lyuma
3262363664 android: Fix UnsupportedOperationException remove from non-ArrayList 2024-03-25 00:04:28 -07:00
Fredia Huya-Kouadio
900fc2a35a Add PermissionsUtil#requestPermissions(...) to provide the ability to request multiple permissions at a time
Fix https://github.com/GodotVR/godot_openxr_vendors/issues/101
2024-03-07 11:23:21 -08:00
Alexander Hartmann
e17cecf54a Fix Compatibility Rendering (GLES3) on old and low budget devices.
Co-Authored-By: joined72 <19651914+joined72@users.noreply.github.com>
2024-02-22 00:24:08 +01:00
Rémi Verschelde
01323cd687
Merge pull request #88385 from m4gr3d/enable_legacy_packaging_main
Add export setting to specify whether the native libraries should be compressed for the gradle build
2024-02-17 00:26:42 +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
af7569d604 Always enable debug symbols when developing with Android Studio 2024-02-15 17:03:28 -08:00
BZ1234567890
04798d6352 [Android 14] Fix GodotEditText white box showing during editor load 2024-02-15 01:06:18 +01:00
Rémi Verschelde
e5a3fd1e53
Merge pull request #88304 from m4gr3d/fix_gradle_build_for_non_ascii_path_main
Fix gradle build errors when the build path contains non-ASCII characters
2024-02-13 23:43:59 +01:00
Rémi Verschelde
afc49e52e4
Merge pull request #88130 from AlekseyKapustyanenko/Rotary_Input
Add rotary input support for Android platform
2024-02-13 23:43:33 +01:00
Rémi Verschelde
b6dee8850b
Merge pull request #87384 from bruvzg/sys_base_color
Add method to get "base" system UI color and system theme change callback.
2024-02-13 23:43:21 +01:00
Rémi Verschelde
68c583d30c
Merge pull request #86619 from Alex2782/fix_flag_decimal
Fix virtual keyboard for decimal values on Android
2024-02-13 23:43:11 +01: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
Alexander Hartmann
6f91c00056 Fix virtual keyboard for decimal values on Android 2024-02-13 22:20:47 +01:00
ALEKSEY KAPUSTYANENKO
d5c2a641f0 Add rotary input support. Fix documentation 2024-02-13 21:12:59 +04:00
bruvzg
ee53ae28df
Add method to get "base" system UI color (macOS/Windows) and system theme change callback. 2024-02-13 18:38:53 +02:00
Rémi Verschelde
51991e2014
Merge pull request #84674 from m4gr3d/add_flag_to_run_scons_from_gradle
Add parameter to allow generation of the Godot native shared libraries from gradle
2024-01-29 23:24:05 +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
Yuri Sizov
6fa577cada Merge pull request #86383 from m4gr3d/editor_export_specify_java_sdk_path_main
Specify the path to the Java SDK used for the Android gradle build
2024-01-18 19:27:01 +01: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
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
Rémi Verschelde
1455159d2c
Merge pull request #86379 from m4gr3d/update_render_thread_paused_timing_main
Android: Update the logic used to start / stop the render thread
2024-01-05 12:05:08 +01:00
Alexander Hartmann
d7c6ad2020 Fix 'get_window_safe_area' on Android 2024-01-03 20:53:37 +01:00
Fredia Huya-Kouadio
f537cdefcf Update the logic used to start / stop the render thread
Currently the render thread is started / stopped when the activity is respectively resumed / paused. However, according to the `GLSurfaceView` documentation, this should be done instead when the activity is started / stopped, so this change updates the start / stop logic for the render thread to match the documentation.
2023-12-20 20:37:16 -08:00