Commit Graph

422 Commits

Author SHA1 Message Date
Brenton Bostick 8abbb98222 Android: fix 'JVM object referenced by 'context' is of type 'Context' and it d… (#14016)
fix 'JVM object referenced by 'context' is of type 'Context' and it does not have access to method 'registerReceiver(BroadcastReceiver, IntentFilter)' declared in class 'ContextWrapper'.'
2025-09-22 08:15:48 -07:00
Brenton Bostick 8d86ee4995 fix various places where nativeSetupJNI being treated as returning int 2025-09-22 07:25:57 -07:00
Sam Lantinga 34b09be6a5 Use clearPrimaryClip() on Android 9 and newer
Fixes https://github.com/libsdl-org/SDL/issues/8355
2025-09-21 23:30:20 -07:00
Sylvain 143f65c1f8 Android: silence false Lint warnings (the class are instantiated only at correct API level) 2025-09-18 13:54:21 -07:00
Sylvain fb0a542b2a Android: Lint warning: LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS is API Level 30 2025-09-18 13:54:21 -07:00
Sylvain d631cf8409 Android: Lint warning: use some explicit Locale
Implicitly using the default locale is a common source of bugs: Use String.format(Locale, ...) instead
2025-09-18 13:54:21 -07:00
Sylvain 8da1021b51 Androind: Lint warning, use "apply()" instead of "commit()"
'Consider using apply() instead; commit writes its data to persistent storage immediately, whereas apply will handle it in the background'
2025-09-18 13:54:21 -07:00
Sylvain 7920e48386 Fixed bug #13849 - Intent always explicit 2025-09-02 09:37:41 -07:00
Sylvain 814f0b7d41 Android: more simplification since min API supported is 21 2025-09-02 12:34:38 +02:00
Sylvain 6136ba7a74 Android: simplification since min API supported is 21 2025-09-01 14:24:42 -07:00
Sylvain 26d6352500 Fixed bug #13794: prevent to use the onBackPressed callback API that is enabled on API36
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-08-27 11:39:00 +02:00
Sylvain e55f636d1e Android: improve check to know if running on ChromeBook or emulator.
https://stackoverflow.com/questions/39784415/how-to-detect-programmatically-if-android-app-is-running-in-chrome-book-or-in
2025-08-26 17:43:58 -07:00
Sam Lantinga 6981522cd6 Revert "Support Google Play 16 KB Page Size Requirement (#13470)"
This reverts commit dc2c83c383

If you need to support the Google Play 16 kiB page size requirement, the recommendation is to use NDK r28c or newer, which automatically aligns binaries correctly.
2025-08-07 11:44:45 -07:00
Matthew Zavislak dc2c83c383 Support Google Play 16 KB Page Size Requirement (#13470)
- See: https://developer.android.com/guide/practices/page-sizes#update-packaging
- Also, make min API uniform at 21 (from 16 and 23 in a few places)
2025-07-31 16:12:54 -07:00
kyle-sylvestre b8e055ce64 use SDL style - else on same line as closing brace 2025-05-20 17:12:01 -07:00
kyle-sylvestre 8e22194217 get preferred locales on android 2025-05-20 17:12:01 -07:00
Vicki Pfau 00f3a82ada Joystick: Add new GIP driver to replace old Xbox One wired driver
This new driver is based on official documentation released by Microsoft in
September, though it still lacks several important features, notably the
Security handshake for wireless dongles and audio support. It is, however, more
reliable and extensible than the old driver.
2025-05-01 11:04:33 -07:00
Sylvain 0177838353 Native functions renamed: {add,remove}AudioDevice to native{Add,Remove}AudioDevice 2025-03-23 15:25:33 +01:00
Sylvain 6e875397f5 Proguard: remove onNativePen 2025-03-23 15:25:33 +01:00
Sam Lantinga 3ed61f203e Fixed applications that integrate Qt with SDL joystick support 2025-03-20 12:16:44 -07:00
Anonymous Maarten de60a5f398 Revert "Make native functions be public otherwise it fails at run-time."
This reverts commit 4fd4d89b63.

This ended up not being necessary since the Android build system
does not minify by default.
When you're minifying, you need to use the proguard rules anyways.

https://github.com/libsdl-org/SDL/pull/12553#issuecomment-2740795848
2025-03-20 19:31:48 +01:00
Sam Lantinga fe024b8fe3 Fixed typo in build.gradle 2025-03-20 11:22:03 -07:00
Sam Lantinga bf7b9b020e Fixed gradle deprecation warnings
"Space-assignment syntax in Groovy DSL has been deprecated. This is scheduled to be removed in Gradle 10.0"
2025-03-20 11:02:04 -07:00
Sam Lantinga ac28702504 Use the android-21 SDK as documented in README-android.md 2025-03-20 10:47:43 -07:00
Sylvain 4fd4d89b63 Make native functions be public otherwise it fails at run-time.
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions
(they are public such as the one in SDLActivity)
2025-03-20 12:11:49 +01:00
Anonymous Maarten 9820f655dd android: reduce visiblity as much as possible 2025-03-19 23:36:08 +01:00
Sam Lantinga b0df1cbbef Updated to version 3.3.0 for development 2025-03-01 19:31:00 -08:00
Sam Lantinga 292e431748 Updated to version 3.2.6 for release 2025-03-01 18:30:34 -08:00
Sam Lantinga 5b98c4a524 Fixed motion events with TOOL_TYPE_UNKNOWN
This happens using hand tracking on a VR headset, and should be treated like normal touch interaction.
2025-02-14 11:50:43 -08:00
Sam Lantinga 982094c85c Updated to version 3.2.5 for development 2025-02-06 16:40:59 -08:00
Sam Lantinga b5c3eab6b4 Updated to version 3.2.4 for release 2025-02-06 16:03:43 -08:00
Sam Lantinga be991239d9 Updated to version 3.2.3 for development
Build (All) / Create test plan (push) Has been cancelled
Build (All) / level1 (push) Has been cancelled
Build (All) / level2 (push) Has been cancelled
2025-02-01 17:43:38 -08:00
Sam Lantinga 2fa1e7258a Updated to version 3.2.2 for release 2025-02-01 17:01:45 -08:00
Susko3 73fc2b03a3 Copy pen handling code from SDLSurface to SDLControllerManager 2025-01-21 21:33:11 -08:00
Sam Lantinga 77b520e93e Updated to version 3.2.1 for development 2025-01-21 14:02:06 -08:00
Sam Lantinga a52fc209bb Updated to version 3.2.0 for release 2025-01-21 08:52:28 -08:00
Sam Lantinga eb168e410c Updated to version 3.1.11 for development 2025-01-16 11:41:28 -08:00
Sam Lantinga 1dd8fadca2 Updated to version 3.1.10 for the release candidate 2025-01-16 08:33:18 -08:00
Sam Lantinga e19a56f4d5 Don't send fake key events while processing real ones on Android
Fixes https://github.com/libsdl-org/SDL/issues/11350
2025-01-14 19:05:07 -08:00
Sam Lantinga 29c684c626 Removed debug logging 2025-01-14 18:05:37 -08:00
Anthony 9a7cfbc2d0 Add onNativePen to proguard-rules.pro 2025-01-11 07:44:55 -08:00
Sam Lantinga 4231848791 Revert "Separate android initialization from Activity (#11891)"
This reverts commit d14c93c4b1.

This is a major breaking change for activities that inherit SDLActivity
2025-01-10 15:27:08 -08:00
Xander d14c93c4b1 Separate android initialization from Activity (#11891) 2025-01-10 15:05:58 -08:00
Sam Lantinga e6bb50a710 Updated to version 3.1.9 for development 2025-01-07 17:51:00 -08:00
Sam Lantinga d7b10d05b1 Updated to version 3.1.8 for the preview release 2025-01-07 17:04:05 -08:00
Kim Giseo 9f2186ad52 Removed outdated comment in AndroidManifest.xml
Build (All) / Create test plan (push) Waiting to run
Build (All) / level1 (push) Blocked by required conditions
Build (All) / level2 (push) Blocked by required conditions
2025-01-04 19:25:00 -08:00
Sam Lantinga 9955e1dc0d Updated the Android gradle plugin to version 8.7.3 2025-01-01 14:33:18 -08:00
Sam Lantinga d4d5faedab Added SDL_EVENT_FINGER_CANCELED
Fixes https://github.com/libsdl-org/SDL/issues/10528
2024-12-30 19:13:02 -08:00
Sam Lantinga 5340f2e3fe Updated to the latest version of gradle, with support for Android SDK 35 2024-12-30 13:13:52 -08:00
Sam Lantinga e91c37f4dd Added support for inset handling on Android 15 2024-12-30 12:23:00 -08:00