Commit graph

709 commits

Author SHA1 Message Date
ygz-bd
a2bfb7cff2 Enable XR Preview Mode for PICO OS
Supported features in the immersive preview mode
- Passthrough
- Hand tracking
Notes:
- Multi-window is only available for internal apps on PICO OS, therefore launching adjacent windows is not possible currently.
- Passthrough splash screen is not supported on PICO OS
2025-01-13 16:34:22 +00:00
Fredia Huya-Kouadio
4bc8918c19 Add support for specifying whether to play the current scene or a specific scene in XR or regular mode
The functionality is only activated for the XR Editor, when a project has OpenXR enabled.
2025-01-12 22:02:24 -08:00
Anish Mishra
d7532f0d31
Android Editor: Fix themed icon 2025-01-06 19:14:00 +05:30
Fredia Huya-Kouadio
7ad9d23a1d Updates how the REQUEST_INSTALL_PACKAGES permission is handled
- Only request the permission the first time the editor tries to open an apk
- Disable the permission for the HorizonOS build as the HorizonOS store doesn't support it yet
2024-12-25 20:04:34 -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
Rémi Verschelde
b46103b286
Merge pull request #100601 from syntaxerror247/wear-OS
Add option to disable `Swipe to Dismiss` for Wear OS
2024-12-20 23:56:54 +01:00
Anish Mishra
5d8e2cd63f Add option to disable Swipe-to-Dismiss for Wear OS 2024-12-20 23:21:50 +05:30
Anish Mishra
9deee0097a Fix Android native file picker 2024-12-19 19:31:32 +05:30
Fredia Huya-Kouadio
23cea1b9d2 Additional fixes and improvements to JavaClassWrapper
- Fix crashing bug when invoking class constructor with parameters
- Add support for accessing class constants
- Add support for Godot Callable arguments. A Godot Callable can be wrapped by a Java Runnable to allow Java logic to run arbitrary Godot lambdas
- Automatically convert java.lang.CharSequence to Godot String as needed
- Code cleanup
2024-12-17 18:46:34 -08:00
Rémi Verschelde
cb5b1ecc25
Merge pull request #100200 from syntaxerror247/android-base-color
Android: Support for `base color` retrieval
2024-12-18 00:39:45 +01:00
Rémi Verschelde
cb0d731daf
Merge pull request #100351 from raulsntos/dotnet/android-gradle-fix
[.NET] Fix gradle builds for multiple ABIs
2024-12-17 22:59:58 +01:00
Rémi Verschelde
66b8101cef
Merge pull request #95460 from m4gr3d/enable_mouse_forward_back_buttons
Enable `BUTTON_FORWARD` and `BUTTON_BACK` mouse buttons on Android
2024-12-17 22:59:20 +01:00
Anish Mishra
70b24c3d16 Android: Support for base color retrieval 2024-12-18 02:14:48 +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
Thaddeus Crews
156bc92282
Merge pull request #98397 from adamscott/add-tmp-support
Add temp utilities (alias `OS::get_temp_dir()`, `FileAccess::create_temp()`, and `DirAccess::create_temp()`)
2024-12-03 14:40:59 -06:00
Thaddeus Crews
6e8c0a43c3
Merge pull request #99378 from syntaxerror247/optional_monochrome_icon
Android: Refactor icon logic and make monochrome icon optional
2024-12-03 14:40:52 -06:00
Adam Scott
1b3e483899
Add file and dir temporary utilities
Co-authored by @Alex2782 for the Android bindings.
Many thanks to the reviewers also.

Co-authored-by: Alex <alex.hart.278@gmail.com>
2024-12-02 12:08:14 -05:00
Anish Mishra
f767cf00fd Android: Make monochrome icon optional 2024-12-02 22:04:38 +05:30
Rémi Verschelde
a702b69ce7
Merge pull request #98917 from syntaxerror247/immersive-mode-issue
Android: Fix immersive mode issue
2024-12-02 15:50:57 +01:00
bruvzg
a4b17e7852 [FileAccess] Return error codes from store_* methods. 2024-11-29 23:22:31 +02:00
Thaddeus Crews
150c69c0f2
Merge pull request #99694 from dsnopek/android-os-create-instance-return-value
Android: `OS.create_instance()` should return `-1` on failure
2024-11-27 10:47:30 -06:00
David Snopek
38e0532ffa Android: OS.create_instance() should return -1 on failure 2024-11-25 15:58:06 -06:00
Anish Mishra
57541d53d3 Android: Extension support for native file dialog 2024-11-19 22:16:32 +05:30
Thaddeus Crews
a767a65cdf
Merge pull request #99123 from tygyh/Update-vulnerable-plugins
Update JavaScript/Java plugins to solve known vulnerabilities
2024-11-13 08:34:00 -06:00
Thaddeus Crews
cb411fa960
Merge pull request #98687 from m4gr3d/disable_swappy_requirement_for_as_debug_builds
Update the `production` build argument for Android Studio debug builds
2024-11-12 12:13:23 -06:00
Dr. Dystopia
3077463151
Update JavaScript/Java plugins to solve known vulnerabilities
Done using the Snyk tool.
2024-11-12 16:06:35 +01:00
Anish Mishra
6fd8d7b634 Android: Update exported app and editor theme 2024-11-08 22:37:52 +05:30
Anish Mishra
6445b6cbdd Android: Fix immersive mode issue 2024-11-07 18:29:25 +05:30
Thaddeus Crews
b00e1cbf74
Merge pull request #97631 from m4gr3d/prompt_apk_install_after_generation
[Android editor] Enable automatic install of exported apks for the Android editor
2024-11-04 21:52:08 -06:00
Thaddeus Crews
7d950c1567
Merge pull request #98712 from syntaxerror247/android_accent_color
[Android] Implement support for accent color retrieval
2024-11-04 21:52:04 -06:00
Thaddeus Crews
2b49543478
Merge pull request #98709 from darksylinc/matias-upsidedown-splash
Fix splash screen upside down on Android
2024-11-04 21:52:01 -06:00
Anish Mishra
7b866f302f [Android] Implement support for accent color retrieval 2024-11-01 16:19:09 +05:30
Matias N. Goldberg
b9a2f108fc Fix splash screen upside down on Android
Fixes an issue introduced in #96439 (see
https://github.com/godotengine/godot/pull/96439#issuecomment-2447288702)

Godot was relying on Java's
activity.getWindowManager().getDefaultDisplay().getRotation(); to apply
pre-rotation but this is wrong.

First, getRotation() may temporarily return a different value from the
correct one; which is what was causing the splash screen to be upside
down. It would return -90 instead of 90 for the first rendered frame.

But unfortunately, the splash screen is just one frame rendered for a
very long time, so the error lingered for a long time for everyone to
see.

Second, to determine what rotation to use, we should be looking at what
Vulkan told us, which is the value we pass to
VkSurfaceTransformFlagBitsKHR::preTransform.

This commit removes the now-unnecessary
screen_get_internal_current_rotation() function (which was introduced by
#96439) and now saves the preTransform value in the swapchain.
2024-10-31 16:52:26 -03:00
Fredia Huya-Kouadio
d699d4b7d4 Update the production build argument for Android Studio debug builds
Swappy is required for `production` build which breaks the Android Studio debug builds as those turns on the `production` argument.
This commit updates the logic so that the `production` argument is only used by Android Studio for `release` builds.
2024-10-30 21:15:31 -07:00
Anish Mishra
b2130efb31 [Android] Implement native file picker support 2024-10-30 14:53:02 +05:30
Thaddeus Crews
05a4620e88
Merge pull request #98615 from Summersay415/three-opengls-please
Fix fallbacks to OpenGL
2024-10-29 19:25:48 -05:00
Thaddeus Crews
08d8909a65
Merge pull request #98574 from syntaxerror247/android_input_dialog
[Android] Implement native input dialog support
2024-10-29 19:25:37 -05:00
Clay John
748f4079e3
Merge pull request #96439 from darksylinc/matias-TheForge-pr03-rebased
Add Swappy & Pre-Transformed Swapchain
2024-10-29 12:34:40 -07:00
Anish Mishra
be5d7f757d [Android] Implement native input dialog support 2024-10-29 20:02:08 +05:30
Fredia Huya-Kouadio
af2423ba4d Enable automatic install of export apks for the Android editor 2024-10-28 16:12:16 -07:00
Matias N. Goldberg
aaa0e2fddf Add Swappy & Pre-Transformed Swapchain
- Adds Swappy for Android for stable frame pacing
- Implements pre-transformed Swapchain so that Godot's compositor is in
charge of rotating the screen instead of Android's compositor
(performance optimization for phones that don't have HW rotator)

============================

The work was performed by collaboration of TheForge and Google. I am
merely splitting it up into smaller PRs and cleaning it up.

Changes from original PR:

- Removed "display/window/frame_pacing/android/target_frame_rate" option
to use Engine::get_max_fps instead.
- Target framerate can be changed at runtime using Engine::set_max_fps.
- Swappy is enabled by default.
- Added documentation.
- enable_auto_swap setting is replaced with swappy_mode.
2024-10-28 18:55:37 -03:00
Summersay415
6d14cd6ff9 Fix fallbacks to OpenGL 2024-10-28 22:57:19 +07:00
Andreas Raddau
90c35f3978 Fix Android app permissions for SDK levels earlier than 28 2024-10-16 12:47:18 +02:00
bruvzg
25f439c573
[DisplayServer] Implement has_hardware_keyboard method for Android and iOS. 2024-10-02 20:09:48 +03:00
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
Fredia Huya-Kouadio
5e0805a813 Provide access to the Android runtime to GDScript
Thanks for the fix of `JavaClassWrapper` in https://github.com/godotengine/godot/pull/96182 and the changes in the previous commit, this introduces an `AndroidRuntime` plugin which provides GDScript access to the Android runtime capabilities.

This allows developers to get access to various Android capabilities without the need of a plugin.
For example, the following logic can be used to check whether the device supports vibration:

```
var android_runtime = Engine.get_singleton("AndroidRuntime")
 if android_runtime:
 	print("Checking if the device supports vibration")
 	var vibrator_service = android_runtime.getApplicationContext().getSystemService("vibrator")
 	if vibrator_service:
 		if vibrator_service.hasVibrator():
 			print("Vibration is supported on device!")
 		else:
 			printerr("Vibration is not supported on device")
 	else:
 		printerr("Unable to retrieve the vibrator service")
 else:
 	printerr("Couldn't find AndroidRuntime singleton")
```
2024-09-29 14:32:10 -07:00
Anish Mishra
dbcc7f3051
Add support for Android Themed Icons (monochrome) 2024-09-27 13:56:34 +02:00
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
Thaddeus Crews
b37fc1014a
Style: Apply new clang-format changes 2024-09-20 08:09:48 -05:00