Commit graph

118 commits

Author SHA1 Message Date
Rémi Verschelde
c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
Bastiaan Olij
b2c0a687f1 Restructuring glue code to make it easier to extend 2019-04-05 21:44:06 +11:00
DESKTOP-3H3MR3A\eloisa
b22cf46fdb Request Android record permission when needed 2019-03-08 12:38:36 -03:00
Pedro J. Estébanez
2d0d64794e Restart game on GL context loss on Android
Bonus:
Remove useless old code about reload hooks

Fixes #22955.
2019-03-06 19:09:17 +01:00
Ivan Ponomarev
288ff2fd08 Android: Fixed a possible crash in keyboard hide method. It's called not from main thread so InputMethodManager can't be used directly. 2019-02-27 16:59:50 +03:00
volzhs
87db1a8971 Fix Android keep screen on working properly 2019-01-15 22:06:44 +09:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
volzhs
b385a4b053 Fix lint error/warning while building android template 2018-12-18 17:26:33 +09:00
Rémi Verschelde
173b342ca7 Remove trailing whitespace
With `sed -i $(rg -l '[[:blank:]]*$' -g'!thirdparty') -e 's/[[:blank:]]*$//g'`
(+ manual revert of some thirdparty code under `platform/android`).
2018-11-20 11:15:02 +01:00
Rémi Verschelde
bfd1f09ac5 Style: Apply clang-format to wrongly formatted files 2018-10-29 23:47:40 +01:00
Xavier Sellier
7dcf779a8b
Prevent a device to be added/deleted more than once on Android
cherry-picked from fb5a601217
2018-10-29 13:04:36 -03:00
Juan Linietsky
bad991ea83 Many more fixes for GLES2 mobile export. Also added ability to turn on OpenGL debugging on Android export. 2018-10-02 10:00:15 -03:00
FeralBytes
39738d1866 Add support for onRequestPermissionsResult()
Credit goes to @vanyasem  https://github.com/vanyasem/Godot-AndroidPermissions
But this is a much needed feature to support Android beyond API 21.
Fixed style errors again.
2018-09-27 19:20:26 -08:00
Xavier Sellier
f68e127079 Add clipboard operation for android OS 2018-09-05 17:27:45 -04:00
Rémi Verschelde
7c9f7452f4 Style: Format code with clang-format 6.0.1 2018-07-18 16:27:03 +02:00
volzhs
d18235bc38 Fix keep screen on property path for Android/iOS/UWP 2018-07-17 18:45:57 +09:00
Konstantin Zaitsev
d05db4de8e Fix possible NullPointerException crash on cancel payment 2018-06-27 14:12:53 +07:00
geequlim
e2aa777d4d Implement OpenGL ES rasterizer selection logic for Android. 2018-06-26 12:21:06 +08:00
volzhs
2f8f34ceaf Remove android compatibility under API 16 2018-05-09 06:01:33 +09:00
Ruslan Mustakov
265caa687b Provide error details when in-app purchase fails 2018-04-19 21:04:20 +07:00
Ruslan Mustakov
5dffa506dc Fix Android input source checks
Input source types are not pure bit flags, they are combinations of
flags, so != 0 check was incorrect and resulted in crashes later, when
trying to obtain the device.
2018-04-16 11:19:07 +07:00
Hugo Locurcio
d698814367
Remove some debugging prints on Android 2018-02-18 00:09:56 +01:00
Xavier Sellier
b8def58705 Add signals and a check function for Android service connectivity.
- Add a iap_connect and iap_disconnect events for android platform.
- Add isConnected() function returning true if its connected to android service, false otherwise

(cherry picked from commit 546b48813f)
2018-02-14 08:05:19 +01:00
Rémi Verschelde
e3658a6464 Fix broken APK expansion due to missed option renames
Command line options were refactored for 3.0 to follow the common usage
of double-dashed long options, but `--main-pack` went through the cracks.

Fixes #16533.
2018-02-13 22:41:19 +01:00
Ruslan Mustakov
8d41175cae Fix Android onTextChanged crash
As it turns out, onTextChanged supplies a mutable CharSequence, which
lead to crashes or unexpected behaviour when input was coming faster
than it was processed.
2018-01-17 19:28:27 +07:00
volzhs
8fbb82719e Fix Android multi touch
Fix #11798
2018-01-07 23:29:44 +09:00
Rémi Verschelde
e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde
b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
Rémi Verschelde
7cb6e6b723 Style: Apply clang-format to Java files
Only those from org/godotengine/godot though, not the thirdparty ones.
2017-12-10 01:16:07 +01:00
Unknown
fd1b94e307 Improve slang, especially in user-visible parts 2017-12-05 15:41:38 +01:00
Bastiaan Olij
6205eb40e7 Align sensors and implement gravity sensor for Android 2017-11-11 09:42:23 +11:00
Ramesh Ravone
55784b0c38
export onBackPress for Android Module 2017-10-15 10:35:13 +05:30
Andreas Haas
547cc8b7ab Merge pull request #11775 from endragor/android-keyboard-input
Improve input handling on Android
2017-10-10 20:22:06 +02:00
Ruslan Mustakov
275e537058 Allow to obtain virtual keyboard height
On mobile platforms virtual keyboards take up significant amount of
screen space and UI containing a text box may need to be adjusted
after the keyboard appears to keep the text box visible to user. This
commit adds a way to obtain virtual keyabord height so that controls
are aware of how much they need to move.
2017-10-04 17:21:05 +07:00
Ruslan Mustakov
ca7447daf6 Improve input handling on Android
- Dispatch input immediately as it comes, instead of delaying it to the
   next step().

 - Fix text box input handling when caret is at the middle of the text.

 - Minimize queueEvent calls on Java side.
2017-10-04 16:14:29 +07:00
volzhs
1a704d7676 Fix TrustManager for Android 2017-09-21 20:56:38 +09:00
Ruslan Mustakov
5ccdeccb6e Make GDNative work on Android
The changes include work done to ensure that GDNative apps and Nim
integration specifically can run on Android. The changes have been
tested on our WIP game, which uses godot-nim and depends on several
third-party .so libs, and Platformer demo to ensure nothing got broken.

 - .so libraries are exported to lib/ folder in .apk, instead of assets/,
   because that's where Android expects them to be and it resolves the
   library name into "lib/<ABI>/<name>", where <ABI> is the ABI matching
   the current device. So we establish the convention that Android .so
   files in the project must be located in the folder corresponding to
   the ABI they were compiled for.

 - Godot callbacks (event handlers) are now called from the same thread
   from which Main::iteration is called. It is also what Godot now
   considers to be the main thread, because Main::setup is also called
   from there. This makes threading on Android more consistent with
   other platforms, making the code that depends on Thread::get_main_id
   more portable (GDNative has such code).

 - Sizes of GDNative API types have been fixed to work on 32-bit
   platforms.
2017-08-30 18:14:19 +07:00
Rémi Verschelde
bd282ff43f Use HTTPS URL for Godot's website in the headers 2017-08-27 14:16:55 +02:00
Henrik Andersson
16de3835fa fix UnsatisfiedLinkError when quitting 2017-08-23 03:14:51 +02:00
Rémi Verschelde
93f1fb1c2f Fixes for new two-dash long command line arguments
- Fixes some single-dash leftovers that were missed in the previous commit
- Reorder the help output for clarity, and document missing options
- Drop obsolete options: --noop, --pack, --editor-scene, --level, --import, --import-script, --no-quit
- Improve error message on malformed arguments and do not display help on error
- Always use long form of arguments when starting a new Godot process from C++, for clarity and easy grepping
- Cleanup obsolete code here and there
2017-08-21 08:09:22 +02:00
Juan Linietsky
b9dcebb37c Revert "Second take at making command-line arguments more UNIX-like + main.cpp and help cleanup" 2017-08-19 17:47:27 -03:00
Rémi Verschelde
70b0857f6c Fixes for new two-dash long command line arguments
- Fixes some single-dash leftovers that were missed in the previous commit
- Reorder the help output for clarity, and document missing options
- Drop obsolete options: --noop, --pack, --editor-scene, --level, --import, --import-script, --no-quit
- Improve error message on malformed arguments and do not display help on error
- Cleanup obsolete code here and there
2017-08-19 16:48:11 +02:00
Juan Linietsky
bbada82f80 -Reorganized all properties of project settings (Sorry, Again).
(Lot's of bloat accumulated, so it was time for clean up.)
-Made EditorSettings and ProjectSettings search more useful (search in sections too)
2017-07-17 22:18:58 -03:00
volzhs
209f61b6d4 Fix android payment logical error
getting sku detail runs only if mod != 0 which means querying 20*n will not get sku details.
referenced from https://github.com/googlesamples/android-play-billing/blob/master/TrivialDrive/app/src/main/java/com/example/android/trivialdrivesample/util/IabHelper.java#L1029-L1062
2017-05-19 12:20:51 +09:00
Rémi Verschelde
413e68fced Merge pull request #8723 from volzhs/fix-android-master
Fix possible memory leak for Android and update gradle
2017-05-12 08:24:22 +02:00
volzhs
9d33f51066 Fix possible memory leak for Android
/godot_dev/platform/android/java/src/com/google/android/vending/expansion/downloader/impl/DownloaderService.java:575: Error: The WIFI_SERVICE must be looked up on the Application context or memory will leak on devices < Android N. Try changing  to .getApplicationContext()  [WifiManagerLeak]
            mWifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Explanation for issues of type "WifiManagerLeak":
   On versions prior to Android N (24), initializing the WifiManager via
   Context#getSystemService can cause a memory leak if the context is not the
   application context. Change context.getSystemService(...) to
   context.getApplicationContext().getSystemService(...).

1 errors, 0 warnings
2017-05-12 14:44:37 +09:00
Rémi Verschelde
c8aea60324 Improve documentation of thirdparty code snippets 2017-05-07 11:42:37 +02:00
volzhs
889ce29fc2 Fix error or download again if use obb for Android 2017-04-26 04:06:45 +09:00
Rémi Verschelde
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde
debeee56f7 Fix typos in source code using codespell
From https://github.com/lucasdemarchi/codespell
2017-03-24 21:45:31 +01:00