Commit graph

663 commits

Author SHA1 Message Date
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
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
Rémi Verschelde
ce384f885c
Merge pull request #32250 from lawnjelly/android-keyboard2
Fix Android keyboard crash with left cursor
2019-09-23 22:09:09 +02:00
lawnjelly
ad5d0cca4d Fix Android keyboard crash with left cursor
Fixes #32168.
Previously we were returning all key up and key down messages as unhandled to the OS. This was resulting in crashes on certain keypresses (left cursor), for undetermined reason.

This PR defaults all key up and keydown messages to be returned as handled by Godot, except those explicitly coded as exceptions (currently volume keys only).
2019-09-23 18:08:41 +01:00
Rémi Verschelde
393a0152ea
Merge pull request #32055 from qarmin/some_code_fixes
Changed some code found by Clang Tidy and Coverity
2019-09-23 10:00:31 +02:00
qarmin
50be65bf43 Changed some code found by Clang Tidy and Coverity 2019-09-22 18:45:08 +02:00
Cagdas
ef5d1ebc95 Fix starting intent problem 2019-09-22 15:02:10 +03:00
Rémi Verschelde
2e065d8ad0
Merge pull request #32064 from m4gr3d/propagate_gl_surface_events
Notify for app pause and resume events on Android
2019-09-20 23:18:40 +02:00
Hugo Locurcio
ba566dff2e
Distinguish editor-originating messages in the editor log
This fades out messages originating from the editor to make messages
printed by the project stand out more.

This also tweaks wording in some editor messages for consistency.
2019-09-20 01:59:02 +02:00
fhuya
a7712cc9e4 Add new events and accompanying logic to notify when the app is paused and resumed on Android devices. 2019-09-19 13:29:49 -07:00
fhuya
7fabfd402f Split the Android platform java logic into an Android library module (lib) and an application module (app).
The application module `app` serves double duties of providing the prebuilt Godot binaries ('android_debug.apk', 'android_release.apk') and the Godot custom build template ('android_source.zip').
2019-09-04 16:20:22 -07:00
Rémi Verschelde
b1f294b3ac Android: Improve dialogs about custom build template
The language didn't make it clear that it's installing a *source* template
to the project folder, for later use when compiling custom APKs.

Fixes #28736.
2019-08-29 13:22:20 +02:00
Rémi Verschelde
b948b38840 SCons: Generate android_source.zip during build
This is now needed after #27781, as this android_source.zip template
is used for custom Android builds from the editor.
2019-08-29 13:22:17 +02:00
Rémi Verschelde
f38c64e8b1
Merge pull request #31709 from akien-mga/android-fix-thirdparty
Android: Fix another regression with Secure.ANDROID_ID, and fix formatting and documentation of thirdparty code
2019-08-27 20:16:08 +02:00
Rémi Verschelde
b7c46ed929
Merge pull request #31713 from volzhs/fix-vibrate
Suppress MissingPermission warning for Android vibration
2019-08-27 17:42:32 +02:00
Rémi Verschelde
eb8d181cb2 Android: Sync Google billing library with upstream, unmodified
Synced with 7a94c6905a.
2019-08-27 15:15:37 +02:00
volzhs
8cda898fbb Suppress MissingPermission warning for Android vibration
It does check its permission every `vibrate_handheld()` calls.
Vibrate permission is added by checking it on export settings.

And there are some changes for deprecated method.
2019-08-27 22:01:45 +09:00
Rémi Verschelde
472d10a0ad Android: Reapply custom changes to Google expansion.downloader lib
I don't know why they're needed, but readding for now to keep things
working as they were.
2019-08-27 14:30:14 +02:00
Rémi Verschelde
ee5898f58a Android: Resync Google expansion.downloader library with upstream, unmodified
Synced with 9ecf54e5ce.
2019-08-27 14:10:31 +02:00
Rémi Verschelde
ce60217894 Android: Reapply changes to Google licensing lib from #24145
But document them better this time.
2019-08-27 14:10:30 +02:00
Rémi Verschelde
6f0367052a Android: Resync Google licensing lib with upstream, unmodified
It had been synced with style changes (spaces -> tabs), not sure why
I accepted to merge it this way back then...

Synced with eb57657f66,
same as before.

Custom-changes will be reapplied in the next commit, if relevant.
2019-08-27 13:44:16 +02:00
Rémi Verschelde
071ebb1e48 Android: Fix another regression with Secure.ANDROID_ID
Regression from #24145, which was missed in #28146.
2019-08-27 13:44:07 +02:00
Rémi Verschelde
04ac6a43a4 Android: Style fixes to manifest and build.gradle 2019-08-27 11:16:55 +02:00
Rémi Verschelde
1afd77e375 Android: Bump gradle version to 5.1.1
Matching changes made in #31521 and #31547 but only in the Jetbrains
IDE config.
2019-08-27 10:22:05 +02:00
fhuya
5eaaabceaf Update the fallback input mapping for the Oculus mobile devices. 2019-08-26 18:48:54 -07:00
Rémi Verschelde
1a4dbd9ee2
Merge pull request #31437 from volzhs/vibrate-mobile
Support vibration for Android and iOS
2019-08-21 21:10:22 +02:00
volzhs
4061e5bb75 Support vibration for Android and iOS 2019-08-21 23:38:53 +09:00
fhuya
f35b1f3b91 Shut down Godot processes on app exit. 2019-08-20 22:35:46 -07:00
Rémi Verschelde
6c607c3564
Merge pull request #31266 from IAmActuallyCthulhu/pr/remove-redundant-author-comments
Remove redundant author doc comments
2019-08-14 13:45:54 +02:00
Rémi Verschelde
37a16fee05 Export: Remove temp files from cache after export
So far we left most temporary files lying around, so this attempts to
fix that.

I added a helper method to DirAccess to factor out the boilerplate of
creating a DirAccess, checking if the file exists, remove it or print
an error on failure.
2019-08-12 13:31:59 +02:00
IAmActuallyCthulhu
82b9557803
Remove redundant author doc comments 2019-08-12 04:26:38 -05:00
Robin Hübner
6ab118c464 Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", "modules/gdnative", "modules/gdscript" directories. 2019-08-09 11:13:24 +02:00
Cameron Reikes
62ed44d75f Add feature tag for hmd devices based on DOF
- Necessary according to https://developers.google.com/vr/develop/android/3dof-to-6dof
2019-08-07 16:41:49 -07:00
Rémi Verschelde
af935af38d
Merge pull request #30468 from SaracenOne/expose_audio_capture
Exposes capture methods to AudioServer + documentation
2019-08-07 13:27:25 +02:00