Commit graph

695 commits

Author SHA1 Message Date
Marcus Brummer 9190f516b1 Improved custom Android template exports
Prevent newlines from beeing appended in AndroidManifest.xml and
build.gradle. Fixes #36708.
2020-03-03 10:49:13 +01:00
Alexander Holland 489b3c2949 Fix double tap pressed event regression
(cherry picked from commit d2a5b7367b)
2020-02-14 15:56:26 +01:00
Hugo Locurcio 9a8455f5a7 Remove per-file progress reporting when exporting to Android
Calling `step()` on EditorProgress too often will slow down the
rest of the editor, so it's best avoided. This is also more consistent
with other exporters, as most of them don't report per-file progress
either.

Exporting a 2D project with ~1,100 files to Android now takes
about 10 seconds from a debug editor build instead of 65 seconds.

This closes #30850.

(cherry picked from commit 2dd3a01d11)
2020-02-06 13:02:08 +01:00
PouleyKetchoupp b2ac2b6201 Fixed LineEdit virtual keyboard inputs on Android
Changed the condition to add a length filter to make it consistent with the documentation (0 means no character limit). Otherwise the default value in LineEdit causes the virtual keyboard to be non-fonctional on Android.

(cherry picked from commit 196860508a)
2020-02-06 13:02:07 +01:00
Rémi Verschelde 096bf873bc
Merge pull request #35632 from godotengine/revert-32854-fix-wireless-adb-debugging
Revert "Fix Android deploy with Remote Debug or Network FS over Wi-Fi"
2020-01-27 21:13:37 +01:00
Rémi Verschelde c317ac89bf
Revert "Fix Android deploy with Remote Debug or Network FS over Wi-Fi" 2020-01-27 19:59:24 +01:00
fhuya 9bd841b86d Address crash caused by missing dependency. 2020-01-27 10:45:25 -08:00
fhuya e41caac7db Address crash caused by missing dependency. 2020-01-27 10:26:01 -08:00
Mark Wynn Garcia 141230192c Check if can export before exporting; show error message if can't export. 2020-01-26 11:45:17 +08:00
Bruno Lourenço a3bcdbeb78 Android virtual keyboard respecting LineEdit max length. 2020-01-23 01:52:49 +00:00
Rémi Verschelde 837adb30fd Revert "Exposes capture methods to AudioServer + documentation" #30468
Reverts the following commits:

- c81ec6f26d:
  "Exposes capture methods to AudioServer, variable renames for
  consistency, added documentation."
- 47c558b98a:
  "Expose audio callbacks as signals."
- dabaa11b3c:
  "Fix to make sure the capture buffers are deallocated at shutdown.
  Silences warnings."

Some documentation improvements were kept for pre-existing methods.

See rationale for reverting these changes in #30468.
2020-01-20 13:18:01 +01:00
Rémi Verschelde adb6734b49 doc: Sync classref with current source 2020-01-19 23:19:29 +01:00
Ignacio Etcheverry a6105c8ea0 Fix ClassDB API portability with some android and editor classes
- `EditorNavigationMeshGenerator` was being registered as part of the Core API,
even after d3f48f88bb. We must make sure to
set Editor as the current ClassDB API type before creating an instance.

- The `VisualScriptEngineSingleton.constant` property has a property hint string
that's different between tools and non-tools builds. This commit makes the
hint string to no longer be set in `_bind_methods`, and to instead set it in
`_validate_property`. This way it's ignored when calculating the API hash.

- `JavaClassWrapper` is now registered in ClassDB on all platforms,
using a dummy implementation on platforms other than Android.
This fixes API portability between Android and other platforms.

- Updated `--class-db-json` command to ignore non-virtual methods that start
with an underscore (see: 4be87c6016).
2020-01-19 20:15:13 +01:00
Rémi Verschelde 7c97bd87d5 Android: Improve name of icon export properties
This seems more readable and still includes the required dimensions.
2020-01-17 13:06:32 +01:00
Bruno Lourenço abe83a1c84 Add support for Android adaptive icons. 2020-01-14 16:11:07 +00:00
Alexander Holland dd2fd4e853 fixes android double tap regression 2020-01-13 12:46:33 +01:00
fhuya 5b9631563c Add support for generating a Oculus Mobile VR apk with hand tracking support. 2020-01-10 09:51:14 -08:00
Alexander Holland b1b308411a Fixes Android FileDialog
- Go up was not working, simplify was used one time too much
- Added GestureHandler
  - Added doubleTap to recognize open dir
  - Fixed scroll where sometimes the scroll jumped between start and end when pointer was outside or on the edge of the scroll area
2020-01-10 15:25:08 +01:00
Bruno Lourenço 90b49e8888 Fix Android exporter manifest creation. 2020-01-09 20:46:06 +00:00
Rémi Verschelde 5011afcb6a Export: Improve usability of command line interface
I'm barely scratching the surface of the changes needed to make the
--export command line interface easy to use, but this should already
improve things somewhat.

- Streamline `can_export()` templates check in all platforms, checking
  first for the presence of official templates, then of any defined
  custom template, and reporting on the absence of any.
  Shouldn't change the actual return value much which is still true if
  either release or debug is usable - we might want to change that
  eventually and better validate against the requested target.

- Fix discrepancy between platforms using `custom_package/debug` and
  `custom_template/debug` (resp. `release`).
  All now use `custom_template`, which will break compatibility for
  `export_presets.cfg` with earlier projects (but is easy to fix).

- Use `can_export()` when attempting a command line export and report
  the same errors that would be shown in the editor.

- Improve error reporting after a failed export attempt, handling
  missing template and invalid path more gracefully.

- Cleanup of unused stuff in EditorNode around the export workflow.

- Improve --export documentation in --help a bit.

Fixes #16949 (at least many of the misunderstandings listed there).
Fixes #18470.
2020-01-07 14:25:56 +01:00
Rémi Verschelde a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
fhuya 50ab6decfe Replace the android.defaultConfig.applicationId in build.gradle with the package/unique_name. 2019-12-30 10:33:48 -05:00
Haoyu Qiu 078c0d75f2 Cleans up headers included in editor_node.h 2019-12-24 21:46:05 +08:00
Rémi Verschelde 8938577459 i18n: Sync translations with Weblate + update template
Also fix a few stray clang-format formatting errors that passed
through CI unnoticed.
2019-12-22 13:27:02 +01:00
Fabio Alessandrelli ca19a3fe9a Fix crash on Android with no manifest permissions.
API allows for null array of permissions. It is now normalized with an
empty array.
2019-12-17 14:46:04 +01:00
Fabio Alessandrelli 04c917899f Add Android NetSocket implementation.
Automatically acquire and release multicast lock when needed.
2019-12-14 18:10:36 +01:00
Fabio Alessandrelli fafda80a4b Add GodotNetUtils Java class for Android.
Provides access to a MulticastLock.
As specified by the Android API, broadcast/multicast packets may be
filtered on some phones unless the application explicitly acquires
a "MulticastLock".
2019-12-14 18:10:36 +01:00
bruvzg 2ef8c5fac5
iOS modular build and export implementation. 2019-12-01 21:57:18 +02:00
Rémi Verschelde 0e6e64c9e9
Merge pull request #32854 from cooperra/fix-wireless-adb-debugging
Fix Android deploy with Remote Debug or Network FS over Wi-Fi
2019-11-28 10:02:55 +01:00
Rémi Verschelde c41c24562d Style: Add missing copyright headers 2019-11-22 08:37:09 +01:00
Rémi Verschelde 6cd3c921f1 Revert "Android : implement InputEventMagnifyGesture and InputEventPanGesture"
This reverts commit 9cc66495cf.

This caused regressions with the handling of screen drag events.

Fixes #33428.
Fixes #33459.
Fixes #33470.
2019-11-11 08:29:58 +01:00
Jérémy Zurcher 9cc66495cf Android : implement InputEventMagnifyGesture and InputEventPanGesture
sets threshold constants PAN_GESTURE_MIN_DELTA and MAGNIFY_GESTURE_MIN_FACTOR
2019-11-02 11:17:22 +01:00
Fabio Alessandrelli 53637e4b1c Improve EditorExportPlatform interface.
Convert all get_device* methods to get_option* and normalize their usage
as icon, label, tooltip.
2019-10-23 10:59:03 +02:00
Cagdas 0088385556 Add request permission automatically at android 2019-10-22 22:52:13 +03:00
Rémi Verschelde acd5c7e767
Merge pull request #32858 from m4gr3d/expand_singleton_base_api
Add `View SingletonBase#onMainCreateView(Activity activity)` api
2019-10-22 13:52:39 +02:00
Fredia Huya-Kouadio 4407350608 Add View onMainCreateView(Activity activity) api to the Godot.SingletonBase class.
The new api allows plugins to define and provide their views for inclusion in the Godot Android view hierarchy.
2019-10-18 10:05:53 -07:00
Robbie Cooper 37e6a8f901 Add connection information and serial number to device description
The description appears when hovering over the one-click-deploy button (top-right). This information helps the user distinguish between their devices if multiple are connected or if the same device is connected by both usb and tcpip (two entries in the list for the same device).
2019-10-15 16:58:26 -04:00
Robbie Cooper f3fdfefa09 Detect adb connection type and debug over Wi-Fi if needed
Avoid using adb reverse if deploying with adb tcpip.

This still can fail if the user is attempting to debug over usb and has connected their device over BOTH usb and tcpip. I'm not sure how we would detect that problem in advance though.
2019-10-15 16:47:14 -04:00
Hugo Locurcio c8a8be6dd1
Optimize images losslessly using oxipng -o6 --strip all --zopfli 2019-10-12 23:23:33 +02:00
fhuya d0f8ef7646 Cleanup fix for the meta-data parsing crashing bug. 2019-10-11 11:12:53 -07:00
Rémi Verschelde 82141729d2 Android: Work around crash in _fix_manifest
Works around #32553, not fixing the underlying cause but
preventing the crash.
2019-10-11 09:03:21 +02:00
Alexander Holland db582a2c8c Adds Pen support for Android 2019-10-04 23:57:01 +02:00
Rémi Verschelde 77b1214a9a
Merge pull request #32514 from akien-mga/android-one-click-dont-uninstall
Android one-click deploy: Don't clear by default
2019-10-03 12:33:51 +02:00
Rémi Verschelde 0c7b3fff44 Android: Fix manifest parsing and APK names in export code
A better fix would be to make Godot's export code properly parse the
tag over multiple lines (and maybe even use XMLParser instead of doing
it ad-hoc?).

As for the APK names, we could alternatively pick the first .apk found
in the `debug` and `release` folders without expecting a specific name.

Fixes #32414.
2019-10-03 12:13:45 +02:00
Rémi Verschelde 9d96f04138 Android one-click deploy: Don't clear by default
This makes iteration faster as you don't need to monitor your phone
to allow the installation each time.

Fixes #32183.
2019-10-03 10:43:59 +02:00
Rémi Verschelde dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin 17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Rémi Verschelde 2b628e5d5b
Merge pull request #32269 from m4gr3d/improve_build_time
Update the Godot gradle build tasks to provide additional flexibility
2019-09-24 16:29:34 +02:00
fhuya ef143447ad Updates the Godot gradle tasks to enable manual runs of the scons command.
Example: To generate for the `release` build target and for the `armv7`, `arm64v8` and `x86` architectures, run the commands:
```
cd godot
scons -j4 platform=android target=release android_arch=armv7
scons -j4 platform=android target=release android_arch=arm64v8
scons -j4 platform=android target=release android_arch=x86
cd platform/android/java
./gradlew generateGodotTemplates
```

Notes:
- The generated build templates will be located in the `godot/bin` directory (i.e: `android_debug.apk`, `android_release.apk`, `android_source.zip`).
- The gradle command will only generate templates for the target(s) with available native shared libraries. For example, running the commands above will only generate the `android_release.apk` and `android_source.zip` files.

To delete the generated artifacts, the following commands can be used:
```
cd platform/android/java
./gradlew cleanGodotTemplates
```
2019-09-24 06:18:21 -07:00
Rémi Verschelde 823c3def72 Fix copyright headers and style issues 2019-09-24 11:52:06 +02:00