Commit graph

130 commits

Author SHA1 Message Date
Wojciech Milkowski 3598165c4d Fix build with Android NDK r18
As a bonus there is no need to use undocumented Gradle API any more.
2018-10-08 22:35:18 +02: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
Max Hilbrunner 28ebddd49e
Merge pull request #19799 from kosz78/android-payment-fix
Fix possible NullPointerException crash on cancel payment
2018-07-03 18:52:10 +02:00
Hugo Locurcio 53e94a1ce1
Optimize images losslessly using oxipng -o6 --strip all --zopfli 2018-06-28 19:17:41 +02: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
volzhs 4bea7d1b5f Update android build tool to latest 2018-01-03 17:25:07 +09: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
Rémi Verschelde 5bc2cf257b Convert DOS line endings to Unix line endings
Should fix issues some of us have with `misc/dist/uwp_template/AppxManifest.xml`
always showing up as modified.
Might cause issues on Windows due to the removal of BOMs or change of line endings
in some of the Mono, UWP or gradlew.bat files, we will test and adapt if need be.
2017-11-05 11:37:59 +01: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
ISylvox 0d8556a7f0 update gradle-android buildtool for master 2017-07-30 11:30:20 +07: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
Rémi Verschelde e80d2b8dfb Merge pull request #8824 from volzhs/android-payment-master
Fix android payment logical error
2017-05-20 09:49:18 +02: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 519df0d34d Use new Godot icon consistently everywhere 2017-05-17 19:53:59 +02: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 8be9b98b8e Update to latest gradle 2017-05-12 14:44:47 +09: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
Juan Linietsky efaeebab4d Several fixes to Android exporter and port.
Android seems to be working again!
2017-03-23 20:14:12 -03:00
volzhs 4866ea828a Fix handling input for Android 2017-03-04 00:15:26 +09:00