Commit graph

363 commits

Author SHA1 Message Date
thebestnom
f5b5e00a01 Android: Add support for cursor icons 2021-05-19 22:01:51 +03:00
thebestnom
47bf216af9 [Android] fix generateDevTemplate 2021-04-28 21:59:42 +03:00
Rémi Verschelde
b999fbc4bd
Merge pull request #48228 from akien-mga/android-build-tools-30.0.3
Android: Upgrade buildTools from 30.0.1 to 30.0.3
2021-04-27 18:42:23 +02:00
Fredia Huya-Kouadio
abb21844d8 Remove deprecated xr features properties. These properties are now provided directly by the plugin. 2021-04-26 13:20:12 -07:00
Rémi Verschelde
d88e1f04df
Android: Upgrade buildTools from 30.0.1 to 30.0.3
It seems 30.0.1 had issues with compatibility with JDK 8 and 11,
which appear to be solved in 30.0.3 as per godotengine/godot-docs#4796.
2021-04-26 17:22:53 +02:00
Rémi Verschelde
c395b9c4ac
Merge pull request #47552 from szymonm-google/validation_layers_android
Validation layers on Android
2021-04-20 20:53:34 +02:00
thebestnom
e598acff3a Allow to build dev template with symbols 2021-04-14 00:14:57 +03:00
Rémi Verschelde
a9c29fdc1f
Merge pull request #47844 from m4gr3d/update_activity_result_callback
Add support for forwarding callbacks from Godot's parent activity
2021-04-13 10:10:29 +02:00
Fredia Huya-Kouadio
1f16ba2696 Add support for forwarding callbacks from Godot's parent activity. 2021-04-12 16:48:35 -07:00
Fredia Huya-Kouadio
b51dc2dc44 Fix custom boot splash image scaling. 2021-04-12 16:38:41 -07:00
Szymon Majewski
0a29322991 Validation layers on Android 2021-04-12 10:09:06 -07:00
Fredia Huya-Kouadio
a21457155b Fix issue causing the response callback to be invoked with the invalid requestCode and deprecate support for forwarding callbacks from Godot's parent activity. 2021-04-09 13:42:49 -07:00
Bastiaan Olij
b3a43430aa Fixes on android:
- creating Vulkan context instead of OpenGL
- checking for validity of ENV in wrapper classes
- fix for access to JavaVM from threads
2021-03-18 10:41:54 +11:00
Fredia Huya-Kouadio
8f285d93e8 Fix onMainRequestPermissionsResult callback for Android plugins. 2021-03-17 09:23:58 -07:00
Fredia Huya-Kouadio
4380004176 Enable doNotStrip when doing development/debugging within Android Studio 2021-03-16 17:21:00 -07:00
Fredia Huya-Kouadio
2d574bcc85 Leverage java annotations to simplify the logic used to register the Godot plugin methods. 2021-03-16 01:16:08 -07:00
MrBrain295
b849873da5
Non functional to non-functional 2021-03-12 10:37:53 -06:00
Fredia Huya-Kouadio
6fd881e43c Update the logic to load Godot Android plugins packaged into the binary.
The previous logic had the side effect of imposing a limit of one plugin per `aar` binary. The update lifts that restriction.
2021-02-26 08:38:39 -08:00
Rémi Verschelde
7f8bfd6ed1
Merge pull request #46381 from m4gr3d/update_godot_fragment_lifecycle_master
Update the initialization timeline for the Godot fragment
2021-02-24 16:14:16 +01:00
Fredia Huya-Kouadio
3ce7678374 Update the initialization timeline for the Godot fragment to be more consistent with the previous activity based timeline. 2021-02-24 06:16:07 -08:00
Fredia Huya-Kouadio
bc5120eb97 Add logic to record the version of the Godot engine for the Android platform. 2021-02-24 04:23:46 -08:00
Fredia Huya-Kouadio
526b99ee36 Disable engine splash logic on Android; this is now handled by the Android theme api.
In addition, add support for scaling and applying filter to the splash screen on Android.
One limitation of the api being used is that the splash screen aspect ratio is not maintained when it's scaled up.
2021-02-18 03:20:49 -08:00
Fredia Huya-Kouadio
9418197081 Add missing ndkVersion to the library gradle build config. 2021-02-17 16:31:31 -08:00
Fredia Huya-Kouadio
e5311f3523 Revert AGP to version 4.0.1 as a workaround to https://issuetracker.google.com/issues/171235570 in version 4.1.x 2021-02-17 15:39:53 -08:00
Rémi Verschelde
c730da8b20
Android: Bump NDK version to 21.4.7075529
This is what GitHub Actions now provide and they removed the previous 21.3.6528147.
A bit annoying to have our hand forced this way but it's still 21.x so should be good
to upgrade.
2021-02-18 00:28:51 +01:00
Fredia Huya-Kouadio
fe9f0758db Expose GodotPlugin's utility methods used for registration and signal emitting.
This enables creation and use of a plugin like class by composition rather than inheritance.
2021-02-15 15:55:59 -08:00
Michael Conrad
cc2547a9e9 Fix joystick axis mapping issues with NVIDIA shield. Probably others.
Issues addressed:

a) Axis mappings were including virtual mouse axes on NVIDIA Shield TV.

The virtual mouse axes have the same axis numbers as the normal analog stick numbers. This was completely breaking joypad support on NVIDIA Shield TV.

b) Joypads were being tracked in a List with the index in the list being treated as the Godot device id.

If a device were to be removed, any device later in the list would be shifted, potentially causing future events with the shifted joypads to have incorrect IDs according to the Godot engine.

c) Unnecessary events were being sent to the Godot engine.

A check was added (per Joystick) that will prevent sending events for all axes when only a single axis value changed.
A similar check was added for "HATs".

See #45712
2021-02-09 08:37:22 -05:00
Rémi Verschelde
54857d7e81
Merge pull request #44949 from m4gr3d/specify_project_ndk_version
Improve the logic to compile for Android
2021-02-05 13:27:37 +01:00
zaevi
befbfecd4d add search extensions for scons' path 2021-01-30 20:13:01 +08:00
Rémi Verschelde
af878716f2
CI: Update to clang-format 11 and apply ternary operator changes 2021-01-12 19:32:53 +01:00
Fredia Huya-Kouadio
eee213e01a Improve the logic to compile for Android by automatically detecting and setting up the Android NDK if needed. 2021-01-05 15:07:17 -08:00
Rémi Verschelde
b5334d14f7
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆
2021-01-01 20:19:21 +01:00
thebestnom
e7f259c366 Android: Allow Mouse Capture 2020-12-08 22:14:08 +02:00
alan-w-255
7fa803fa2c
fix android wrong multi-touch pointerid
Fixes #43519.
2020-12-03 13:34:04 +01:00
Fredia Huya-Kouadio
918b218b55 Update gradle build files to automatically perform signing and zipalign tasks for custom builds. 2020-11-22 18:11:54 -08:00
Aaron Franke
02161aad5a
Remove empty lines around braces with the formatting script 2020-11-16 23:38:11 -05:00
Rémi Verschelde
484c3d5e27
Merge pull request #43248 from HEAVYPOLY/master
Change android orientations from sensor to user
2020-11-16 22:12:53 +01:00
Fredia Huya-Kouadio
46cc3233d8 Update the logic to query for the 'scons' command executable path. 2020-11-14 14:36:53 -08:00
Vaughan Ling
d658063833 Change android orientations from sensor to user
# Conflicts:
#	platform/android/java/lib/src/org/godotengine/godot/GodotIO.java
2020-10-31 17:14:32 -07:00
Rémi Verschelde
41f66761fd
Merge pull request #37158 from thebestnom/android-click-support
Support mouse events on Android
2020-10-30 16:00:03 +01:00
Fredia Huya-Kouadio
edf762fba6 Add a separate nativeSrcsConfigs module to handle Android Studio constraints for native code editor support. 2020-10-29 00:01:14 -07:00
Fredia Huya-Kouadio
aff7cf4390 Update the gradle plugins 2020-10-28 23:59:33 -07:00
Mark Riedesel
96e22bd9fb Implement OS.get_window_safe_area() for Android 2020-10-27 13:14:00 -04:00
thebestnom
42513f2f47 Android: Mouse Implementation
Implement mouse
Move touch to inputManager
Change to use android/input.h
2020-10-09 04:14:56 +03:00
Rémi Verschelde
4e19e3603b
Merge pull request #41385 from m4gr3d/fix_splash_loading_master
Fix splash screen loading on Android
2020-09-28 20:45:53 +02:00
Fredia Huya-Kouadio
79c1cf600b Add overridable init method for the Godot fragment instance. 2020-09-18 16:59:09 -07:00
Fredia Huya-Kouadio
b8d5ced8cd Fix issue causing the textedit to move upward 2020-08-30 10:42:38 -07:00
Rémi Verschelde
c59e9399e7
Merge pull request #41550 from godotengine/revert-40671-virtual-keyboard-height-fix
Revert "Fix virtual keyboard height regression"
2020-08-27 08:55:51 +02:00
Rémi Verschelde
f98b32ff51
Merge pull request #41549 from godotengine/revert-40484-android-virtual-keyboard-adjustment
Revert "Disable virtual keyboard focus adjustment on Android"
2020-08-26 23:48:09 +02:00
Fredia Huya-Kouadio
db35a008f6
Revert "Fix virtual keyboard height regression" 2020-08-26 14:38:02 -07:00
Fredia Huya-Kouadio
ffd0bb1d02
Revert "Disable virtual keyboard focus adjustment on Android" 2020-08-26 13:27:25 -07:00
Fredia Huya-Kouadio
04b402b6f1
Revert "Move PopupWindow logic to GodotEditText on Android" 2020-08-26 13:24:18 -07:00
Fredia Huya-Kouadio
2717891141 Fix splash screen loading on Android 2020-08-19 16:16:37 -07:00
Aman Jain
2b89944a3d Add 'Export App Bundle' to Android Export Options 2020-08-05 12:55:02 -04:00
PouleyKetchoupp
cac7eb3a64 Move PopupWindow logic to GodotEditText on Android 2020-07-28 21:19:17 +02:00
Rémi Verschelde
bd9fc75768
Merge pull request #40706 from akien-mga/style-fix-file_format-macos
Fix code format scripts compat with non-GNU Unices
2020-07-27 13:27:56 +02:00
Rémi Verschelde
c71e189efd Style: Fix code format scripts compat with non-GNU Unices
It's too hard to get compatibility between GNU and BSD sed,
so let's just use perl oneliners.

And improve it to also remove trailing tabs, not just spaces.
2020-07-27 13:11:44 +02:00
Rémi Verschelde
6de86946ea
Merge pull request #40671 from nekomatata/virtual-keyboard-height-fix
Fix virtual keyboard height regression
2020-07-27 08:57:19 +02:00
PouleyKetchoupp
8c05dadcff Fix Return key events in LineEdit & TextEdit on Android
Depending on the device implementation, editor actions could be
received with different action ids or not at all for multi-line.

Added a parameter to virtual keyboards to properly handle single-line
and multi-line cases in all situations.

Single-line:
Input type set to text without multiline to make sure actions are sent.
IME options are set to DONE action to force action id consistency.

Multi-line:
Input type set to text and multiline to make sure enter triggers new lines.
Actions are disabled by the multiline flag, so '\n' characters are
handled in text changed callbacks.
2020-07-26 20:06:07 +02:00
PouleyKetchoupp
a2dd966301 Fix virtual keyboard height regression
Disabling virtual keyboard focus adjustement caused get_keyboard_height
to always return 0 because it was calculated when the view is resized.

In order to fix it, a PopupWindow is now created on top of the main view
and is set for focus adjustments so the keyboard size can be calculated
based on this popup without affecting the main view.
2020-07-24 19:54:06 +02:00
Aman Jain
e53067c42e Write an AndroidManifest.xml file to be merged with app module's manifest. 2020-07-24 12:53:27 -04:00
thebestnom
166103c759 Android: Keyboard modifier and arrow key support 2020-07-21 22:13:24 +03:00
Rémi Verschelde
b7aa474680
Merge pull request #40422 from amanj120/forward_port_bundle_pr_resources
Create strings.xml files in the Gradle project to handle localization
2020-07-20 22:26:44 +02:00
PouleyKetchoupp
d7aaec8ffe Disable virtual keyboard focus adjustment on Android
Fixes #37190

The default adjustment setting was causing the view to pan down in order
to adjust the focus on the text content.

We don't need any focus adjustment since we're using a fixed size window
for our application.

Documentation:
https://developer.android.com/reference/android/view/WindowManager.LayoutParams#SOFT_INPUT_ADJUST_NOTHING
2020-07-20 12:04:02 +02:00
Aman Jain
5ff6f7a86b Create strings.xml files in the gradle project to handle localization 2020-07-15 13:02:59 -04:00
Aaron Franke
9986439352
Commit other files changed by file_format.sh 2020-07-13 14:14:11 -04:00
Fredia Huya-Kouadio
2d53b8173e Fix the logic to enable focus awareness 2020-06-27 16:43:08 -07:00
Fredia Huya-Kouadio
175d43738a Enable the ability to use Godot as a subview within an Android app 2020-06-25 19:52:40 -07:00
Fredia Huya-Kouadio
206cbd960b Follow up cleanup for the godotpayment project module 2020-06-22 12:53:25 -07:00
Timo Schwarzer
83a966f0d8
Remove GodotPayment android plugin
This is now available in a separate repository
at https://github.com/godotengine/godot-google-play-billing
2020-06-22 09:21:05 +02:00
Fredia Huya-Kouadio
6daf9b78af Clean up the GodotPlugin public API. 2020-06-16 09:25:09 -07:00
Fredia Huya-Kouadio
2bf1f8e4b3 Add support for focus awareness 2020-06-04 15:49:55 -07:00
volzhs
c227733bd8 Add missing consumePurchase plugin method for GodotPayment 2020-05-28 22:48:48 +09:00
Fredia Huya-Kouadio
c948d25b6e Validate that Use Custom Build is enabled when Plugins are selected
Remove `GodotPayment` from the default build template
2020-05-27 12:07:53 -07:00
Fredia Huya-Kouadio
75100e5644 Provide the ability for clients of the Godot library to add their own command line arguments 2020-05-27 02:13:52 -07:00
Rémi Verschelde
24ad4894cc
Merge pull request #39050 from timoschwarzer/google-play-billing-4.0
(4.0) Re-implement GodotPayment Android plugin using the Google Play Billing library
2020-05-26 15:34:06 +02:00
Timo Schwarzer
4b00bf8e83
Re-implement GodotPayment Android plugin using the Google Play Billing library 2020-05-25 22:24:17 +02:00
Fredia Huya-Kouadio
bf76d2afcf Stop ignoring hidden files and directories in the assets directory 2020-05-25 12:03:35 -07:00
Rémi Verschelde
3ecdc27f49
Merge pull request #39004 from nekomatata/android-reset-surface
Proper surface reset when resuming app on Android
2020-05-24 22:31:03 +02:00
PouleyKetchoupp
b987677cc0 Proper surface reset when resuming app on Android
Just re-creating the window instead of restarting the app entirely.
2020-05-24 20:42:21 +02:00
PouleyKetchoupp
39f59786fa Use long instead of int for object id in Android java wrapper
Using int for 64-bit values might cause issues with objects not found
in ObjectDB when the id is truncated.
2020-05-24 13:26:18 +02:00
Rémi Verschelde
aec07538f4
Merge pull request #38309 from SkyLucilfer/AndroidLineEdit
Fix Android LineEdit editing bugs
2020-05-20 11:45:59 +02:00
Rémi Verschelde
ca3192d18a Style: Fix unnecessary semicolons that confused clang-format 2020-05-19 11:24:58 +02:00
Fredia Huya-Kouadio
14e6696c8e Implementation of the Godot Android Plugin configuration file 2020-05-17 11:11:26 -07:00
SkyJJ
cc473b948f Fix Android LineEdit editing bugs 2020-05-16 17:55:27 +02:00
Rémi Verschelde
d999071edf
Merge pull request #37924 from thebestnom/migrate-to-androidX
Android: Migrate deprecated support library to AndroidX
2020-05-16 09:03:17 +02:00
Rémi Verschelde
0be6d925dc Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.

This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.

There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).

Part of #33027.
2020-05-14 16:54:55 +02:00
thebestnom
d0ced7a481 Android: Migrate deprecated support library to AndroidX 2020-05-10 19:03:44 +03:00
Rémi Verschelde
e956e80c1f Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
Part of #33027, also discussed in #29848.

Enforcing the use of brackets even on single line statements would be
preferred, but `clang-format` doesn't have this functionality yet.
2020-05-10 13:12:16 +02:00
Rémi Verschelde
03b13e0c69 Style: Add missing copyright headers 2020-05-10 13:12:16 +02:00
Rémi Verschelde
6038325470 clang-format: Add JavaImportGroups for Java code 2020-05-06 23:26:43 +02:00
Fredia Huya-Kouadio
ef62506e5c Address OS.request_permissions() bug when non-platform permission(s) is included 2020-05-05 10:33:46 +02:00
Fredia Huya-Kouadio
2f38cfd9ab Fix Android templates size regression
The issue was caused by PR #36906 which changes prevented the generated shared libraries from being stripped.
Since the change is only needed for development (debugging) purposes, it's commented out by default.
2020-04-23 00:21:39 -07:00
fhuya
c591cb8fda Migrate legacy apache dependency to the GodotPayment plugin
This is the only location in the codebase where it's being used, so no need to make the main lib have a dependency on it.
2020-04-15 22:36:58 -07:00
Rémi Verschelde
ca896ddbf0 Android: Bump build tools to 29.0.3 2020-04-14 13:47:13 +02:00
fhuya
73d4e2eefb Delete unused drawable resources. 2020-04-13 16:15:37 -07:00
fhuya
948c3cbb88 Add signal support to Godot Android plugin:
Supports registering and emitting signal from a Godot Android plugin
2020-04-10 09:22:21 -07:00
Rémi Verschelde
35c8ec065c
Merge pull request #37256 from m4gr3d/add_custom_build_gradle_settings
Update Android custom template build configuration
2020-04-10 13:57:56 +02:00
PouleyKetchoupp
e167af3737 Display Server support 2020-04-08 01:47:09 +02:00
fhuya
9c11076a20 Update Android custom template build configuration. 2020-04-07 09:07:44 -07:00