Commit Graph

325 Commits

Author SHA1 Message Date
Fredia Huya-Kouadio 2803c471e8 Bump the target SDK version to 33 (Android 13) 2023-03-21 19:24:39 -07:00
Fredia Huya-Kouadio b04c9a71f4 Implement file provider capabilities
The previously used file sharing api was restricted after Android N causing the engine to crash whenever used on devices running Android N or higher.
2023-02-01 01:01:20 -08:00
Tom Beckmann 52919ff352
Fix writing value for hand-tracking V2.0 to AndroidManifest.xml
(cherry picked from commit 0116d50fdd)
2023-01-20 12:16:31 +01:00
Rémi Verschelde 1426cd3b3a
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".

Backported from #70885.
2023-01-10 15:26:54 +01:00
Dan d789ad4b20 fix exporting Android APPLICATION_ATTRIBS (3.X) 2022-11-22 12:24:17 -08:00
Fredia Huya-Kouadio 1f23bac645 Disable menus and functionality that are not relevant on the Android Editor port 2022-09-13 07:38:07 -07:00
Fredia Huya-Kouadio 989d5990ad
Merge pull request #64420 from m4gr3d/investigate_read_write_access_loss_3x
[3.x] Fix issue preventing the Android Editor from displaying the project content
2022-08-15 13:19:01 -07:00
Fredia Huya-Kouadio 3ac6b6a596 Disable threads used to check on plugins to load
The functionality is unavailable on Android (requires export capability) and unnecessarily consumes resources
2022-08-15 02:30:08 -07:00
Fredia Huya-Kouadio d2213f76a9 Refactor the export checking logic to improve separation of concerns 2022-08-14 08:47:09 -07:00
Rémi Verschelde 818f1eed31 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 14:53:37 +02:00
Fredia Huya-Kouadio 27b63247fd Fix issue causing the Android Editor port to crash when saving a scene
In addition:
- Disable 'adb devices' query (not supported when running the editor on Android devices
- Add `move_to_trash` implementation for Android devices
2022-07-05 02:59:52 -07:00
Rémi Verschelde f089f77c2a Android: Refactor Custom Build options in export preset
Instead of reusing the custom_template/ prefix which is actually only
used for the prebuilt APK workflow, we add a new custom_build/ prefix.

This is a slight compat breakage (users will have to redo their config)
but enables us to group the Min SDK and Target SDK options where they make
sense, and avoid reusing the previously hardcoded Target SDK 30 from
Godot 3.4.

Those two options are now strings instead of integers so that we can keep
them empty by default, and show their default value using a placeholder.
So some validation has been added to make sure they are proper ints.
The upper bound on Target SDK was also removed as it's a common use case
to use it to try to target newer released SDKs. But we warn the user that
this wasn't validated by us.

The export info dialog is now exclusive so that when it doesn't auto-close,
i.e. when it errors, you don't close it by mistake by clicking outside.

Fixes #62465.
2022-07-03 17:09:41 +02:00
ne0fhyk 24e3b3b88d 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-06-26 16:53:02 -07:00
Gustavo Maciel a38119a746 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

(cherry picked from commit ec6d5d6cba)
2022-06-23 15:59:15 +02:00
bruvzg f5fa1ca944
Add readable export errors. Add RTL image vertical alignment support. 2022-06-08 17:56:28 +03:00
Marcel Admiraal 7a782edeaa Cleanup Android C++ code 2022-05-31 17:11:44 +01:00
Rémi Verschelde 2b2a1b4c71 Android: Change export plugin poll to 300 ms
This removes the reliance on the not-so-fully-implemented Power API,
which throws an error in the HTML5 editor.

This was already changed to 200 ms in the master branch, and here I
picked 300 ms to be consistent with the iOS export plugin. All these
thread sleeps need to be re-assessed together to be made more
consistent (and possibly configurable - and most importantly battery
preserving by default).
2022-05-25 12:16:24 +02:00
Fredia Huya-Kouadio b162e7ac39 Fix the logic to restart the Godot application 2022-05-23 13:15:25 -07:00
Haoyu Qiu b657d0c76c Add dedicated macros for property name extraction
* Replace case-by-case extraction with PNAME & GNAME
* Fix group handling when group hint begins with property name
* Exclude properties that are PROPERTY_USAGE_NOEDITOR
2022-05-19 11:31:35 +08:00
Fredy Huya-Kouadio 32ace78a3e Update Meta hand tracking version
https://developer.oculus.com/blog/presence-platforms-hand-tracking-api-gets-an-upgrade/
2022-04-27 21:14:49 -07:00
Fredia Huya-Kouadio a3b445d7e8 Remove duplicate `resizable` settings
(cherry picked from commit f1a7caf9bb)
2022-04-13 11:43:49 +02:00
Fredia Huya-Kouadio 4ff726b933 Update `resize` settings:
- Unlock resizing for the Godot Editor
- Add an option to specify whether a game is resizeable for the Godot template

(cherry picked from commit 3f299e9255)
2022-04-13 11:43:49 +02:00
Haoyu Qiu 1348f868c9 Make string inside TTR() single-line 2022-02-28 20:09:34 +08:00
Fredia Huya-Kouadio 5deeb38a70 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 when we're not using the VrApi plugin
2022-01-26 08:58:47 -08:00
Rémi Verschelde c938104a88
Merge pull request #56630 from Pineapple/replace-find-last 2022-01-18 16:36:52 +01:00
Rémi Verschelde a627cdafc5
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Jason Knight 39070291ef Android export plugin passes absolute file paths to gradle for keystores. 2022-01-10 15:16:00 -06:00
Bartłomiej T. Listwon 22750b1c03 Replace String::find_last with rfind where possible (backward compatible with old API) 2022-01-08 22:40:44 +01:00
bruvzg d2558bdc8c
Fix decoding UTF-8 filenames on unzipping.
(cherry picked from commit d2573c1636)
2022-01-06 00:21:37 +01:00
Rémi Verschelde 45aac0b9e9
Merge pull request #55768 from m4gr3d/config_hand_tracking_frequency_3x 2021-12-09 23:05:06 +01:00
Fredia Huya-Kouadio 4f6ce8a7ba
Enable configuration of the `android:excludeFromRecents` activity attribute.
(cherry picked from commit cfa81ff32a)
2021-12-09 23:03:19 +01:00
ne0fhyk 9d22ad3c9b Add support for configuring the xr hand tracking frequency mode 2021-12-09 12:26:06 -08:00
Fredia Huya-Kouadio 65cfa28cce Add configs to specify the min and target sdk versions. 2021-12-08 09:06:09 -08:00
Fredia Huya-Kouadio 9c50bcabed Add support for OpenXR export configurations. 2021-11-20 06:59:36 -08:00
Pedro J. Estébanez 4f8bc77a4c Drop broken Android 32-bit framebuffer setting 2021-11-15 10:44:41 +01:00
Rémi Verschelde 1b65550ec7
clang-format: Various fixes to comments alignment from `clang-format` 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 14:50:32 +02:00
Rémi Verschelde 42d385b312
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Rémi Verschelde c7f4e1d5dd
Android: Properly validate `godot_project_name_string` for Android special chars
Fixes #52659.

(cherry picked from commit 9204a3a50e)
2021-10-26 18:23:47 +02:00
ne0fhyk 754db65a1f
Pass the correct `export_format` argument to locate the assets directory when exporting.
(cherry picked from commit 431ccdb057)
2021-10-11 18:04:16 +02:00
PouleyKetchoupp 52fdb4ece9 Window transparency support on Android
Implements per-pixel transparency feature on Android.
Allows plugins to do specific rendering and render godot UI on top
(useful for camera support with drawing on top).
2021-09-15 10:41:08 -07:00
ne0fhyk 35a98d305b Add support for Play Asset Delivery.
This only adds support for a subset of Play Asset Delivery: this causes a single install-time asset pack to always be present, but doesn't add support for dynamically downloaded asset packs.
2021-09-15 06:02:53 -07:00
ne0fhyk 0cfbe354d7 Refactor Android platform export structure. 2021-09-09 10:48:29 -07:00
Fredia Huya-Kouadio 5b8d7752b5 Update Oculus vr configs and add support for accessing Oculus OpenXR runtime 2021-08-27 11:16:20 -07:00
ne0fhyk c88d1608ab Add partial support for Android scoped storage.
This is done by providing API access to app specific directories which don't have any limitations and allows us to bump the target sdk version to 30.
In addition, we're also bumping the min sdk version to 19 as version 18 is no longer supported by Google Play Services and only account of 0.3% of Android devices.
2021-08-13 11:04:17 -07:00
Fredia Huya-Kouadio 336c630f51 Add support for prompting the user to retain app data on uninstall.
Supported on Android 10 and higher.
2021-08-12 22:06:13 -07:00
Haoyu Qiu 55b52341d1 Make progress and errors translatable when exporting to Android 2021-08-01 17:15:56 +08:00
Fredia Huya-Kouadio df1ebbb0aa Fix custom build export 2021-07-27 12:24:44 -07:00
reduz ca223d71d8
Addes ability to load build sources from file.
* If not present, the dialog asks to load build sources from a file.
* The export templates check now also verifies that build sources are installed and skips the template check.

This makes Android development easier.

(cherry picked from commit 6639cc9853)
2021-07-20 13:05:10 +02:00
Rémi Verschelde 46c68c0fb9
Android: Fix truncated `application` attributes after #50028 cherry-pick
The `android:icon` attribute is expected to be the last one in the application
definition, as documented by the comment. cd64bcd missed that and caused some
arguments to be truncated.

Fixes #50224.
2021-07-07 00:49:07 +02:00
Rémi Verschelde 3d16bfcc40
Android: Fix syntax error in #50227 2021-07-07 00:08:59 +02:00