android-project


Log

Author Commit Date CI Message
Sam Lantinga 8b57331e 2019-05-23T11:05:43 Fixed hiding the Android virtual keyboard when the return key is pressed
Sylvain Becker f91b8785 2019-05-23T09:08:40 Android: minimum size for IME, so that it takes focus In API 28, 0 width views can't take focus, so if someone tries to position the IME without setting a width, they'll stop getting text events. Tested on Android 9: with a 0 size, it would send correctly letters a, b, c, etc. but not numbers.
Sam Lantinga 1a38853e 2019-04-24T12:53:15 Fixed bug 4566 - Hot-plugging Bluetooth controller causes force-quit on Android Anthony @ POW Games I tried adding different configChanges and sure enough, "navigation" worked! Now bluetooth controllers hot-plug nicely. So shall we add it as a default to the AndroidManifest.xml? Funny that this is how this activity is described: "navigation" The navigation type (trackball/dpad) has changed. (This should never normally happen.) I think the reason behind this is because the bluetooth game controller I was testing doubles-up as a keyboard, which probably comes with a DPAD? It's a MOCUTE-032X_B63-88CE
Sam Lantinga f5252530 2019-04-23T14:08:14 Change my previous fix based on feedback from dev @saml
Sam Lantinga ecce803d 2019-04-23T12:59:28 Fix compile errors I hit when building org.libsdl in source2 (part 2 of 2) @saml
Sam Lantinga 45b5453b 2019-04-23T12:59:20 Fix compile errors I hit when building org.libsdl in source2 (part 1 of 2)
Sam Lantinga 9950271b 2019-04-22T16:19:52 Fixed bug 4580 - Android 8: immersive fullscreen notification causes flickering between fullscreen and non-fullscreen and app is unresponsive Sylvain 2019-04-18 21:22:59 UTC Changes: - SDL_WINDOWEVENT_FOCUS_GAINED and SDL_WINDOWEVENT_FOCUS_LOST are sent when the java method onWindowFocusChanged() is called. - If we have support for MultiWindow (eg API >= 24), SDL event loop is blocked/un-blocked (or simply egl-backed-up or not), when java onStart()/onStop() are called. - If not, this behaves like now, SDL event loop is blocked/un-blocked when onPause()/onResume() are called. So if we have two app on screen and switch from one to the other, only FOCUS events are sent (and onPause()/onResume() are called but empty. onStart()/onStop() are not called). The SDL app, un-focused, would still continue to run and display frames (currently the App would be displayed, but paused). Like a video player app or a chronometer that would still be refreshed, even if the window hasn't the focus. It should work also on ChromeBooks (not tested), with two apps opened at the same time. I am not sure this fix Dan's issue. Because focus lost event triggers Minimize function (which BTW is not provided on android). https://hg.libsdl.org/SDL/file/bb41b3635c34/src/video/SDL_video.c#l2653 https://hg.libsdl.org/SDL/file/bb41b3635c34/src/video/SDL_video.c#l2634 So, in addition, it would need to add by default SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS to 0. So that the lost focus event doesn't try to minimize the window. And this should fix also the issue.
Sam Lantinga cf87d576 2019-04-16T20:00:14 Explicitly load hidapi as a dependency of the SDL library This fixes loading on Android 4.2
Sylvain Becker bfdd0b22 2019-04-04T17:01:02 Android: remove SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH java layer runs as if separate mouse and touch was 1, Use SDL_HINT_MOUSE_TOUCH_EVENTS and SDL_HINT_TOUCH_MOUSE_EVENTS for generating synthetic touch/mouse events
Sylvain Becker 3bc1a8b6 2019-03-13T14:08:21 Android: minor comment update
Sylvain Becker 9d10c738 2019-01-17T16:30:19 Android: remove duplicate code in SDLGenericMotionListener_API24 and use parent method
Sylvain Becker 55838d8b 2019-01-17T14:59:46 Android: remove another hard-coded constant for Samsung DeX (no op!)
Sylvain Becker 56f4a711 2019-01-17T13:42:13 Android: minor change in the evaluation of SOURCE_CLASS_JOYSTICK (no op!) InputDevice.SOURCE_CLASS_* are one bit More readable to check that the source has this class_joystick set, compared to the other statements, where the source is gamepad or dpad. (Clean-up from bug 3958)
Sylvain Becker 8f828a8e 2019-01-17T12:25:19 Android: remove hard-coded constant for Samsung DeX (no op!) 12290 = 0x3002 = SOURCE_MOUSE | SOURCE_TOUCHSCREEN SOURCE_MOUSE Constant Value: 8194 (0x00002002) SOURCE_TOUCHSCREEN Constant Value: 4098 (0x00001002) SOURCE_CLASS_POINTER Constant Value: 2 (0x00000002) https://developer.android.com/reference/android/view/InputDevice.html
Sylvain Becker e5f8801f 2019-01-17T11:05:05 Android: prevent concurrency in Android_SetScreenResolution() when exiting by checking Android_Window validity - SDLThread: user application is exiting: SDL_VideoQuit() and clearing SDL_GetVideoDevice() - ActivityThread is changing orientation/size surfaceChanged() > Android_SetScreenResolution() > SDL_GetVideoDevice() - Separate function into Android_SetScreenResolution() and Android_SendResize(), formating, and mark Android_DeviceWidth/Heigh as static
Sylvain Becker 6690a469 2019-01-17T09:28:30 Android: also update APP_PLATFORM to android-16 in Application.mk https://hg.libsdl.org/SDL/rev/701c83eeb6e7 https://hg.libsdl.org/SDL/rev/0a69e71b715a
Sylvain Becker 291f6006 2019-01-16T09:22:20 Android: merge SDLJoystickHandler_API12 and SDLJoystickHandler_API16
Sylvain Becker a8675416 2019-01-16T09:12:31 Android: remove trailing spaces
Sylvain Becker d86de288 2019-01-16T09:11:13 Android: remove old code after Android-16 has been set as minimum requirement
Sylvain Becker dc263450 2019-01-14T23:33:48 Android: create Pause/ResumeSem semaphore at higher level than CreateWindow() - If you call onPause() before CreateWindow(), SDLThread will run in infinite loop in background. - If you call onPause() between a DestroyWindow() and a new CreateWindow(), semaphores are invalids. SDLActivity.java: the first resume() starts the SDLThread, don't call nativeResume() as it would post ResumeSem. And the first pause would automatically be resumed.
Sylvain Becker ae41831e 2019-01-14T21:34:12 Android: minor, remove static attributes, move mIsSurfaceReady to SDLSurface
Sylvain Becker 42e18bd0 2019-01-11T14:25:32 Android: fix bad merge from previous commit
Sylvain Becker 7a1d1bae 2019-01-10T21:40:57 Android: add name for Touch devices and simplification, from bug 3958
Sylvain Becker d23c2f07 2019-01-10T18:05:56 Fixed bug 3930 - Android, set thread priorities and names SDLActivity thread priority is unchanged, by default -10 (THREAD_PRIORITY_VIDEO). SDLAudio thread priority was -4 (SDL_SetThreadPriority was ignored) and is now -16 (THREAD_PRIORITY_AUDIO). SDLThread thread priority was 0 (THREAD_PRIORITY_DEFAULT) and is -4 (THREAD_PRIORITY_DISPLAY).
Sylvain Becker 0e0e0272 2019-01-10T16:04:52 Android: remove deprecated PixelFormat in surfaceChanged() Can be check by adding in build.grable: gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } } SDLActivity.java:1691: warning: [deprecation] A_8 in PixelFormat has been deprecated case PixelFormat.A_8: SDLActivity.java:1694: warning: [deprecation] LA_88 in PixelFormat has been deprecated SDLActivity.java:1697: warning: [deprecation] L_8 in PixelFormat has been deprecated SDLActivity.java:1700: warning: [deprecation] RGBA_4444 in PixelFormat has been deprecated SDLActivity.java:1704: warning: [deprecation] RGBA_5551 in PixelFormat has been deprecated SDLActivity.java:1716: warning: [deprecation] RGB_332 in PixelFormat has been deprecated
Sylvain Becker 5c11e5ef 2019-01-10T15:48:43 Android: some simplification, don't need mExitCalledFromJava
Sylvain Becker 66fbfe1d 2019-01-10T15:43:07 Android: nativeQuit for SDLActivity thread - destroy Android_ActivityMutex - display any SDL error message that may have occured in this thread, since SDL_GetError() is thread specific, and user has no access to it.
Sylvain Becker dad81611 2019-01-10T15:35:46 Android: only send Quit event to SDLThread if it's not already terminated And it avoids reporting errors using Android_Pause/ResumeSem that are NULL.
Sylvain Becker 61d37de0 2019-01-10T15:29:37 Android: un-needed transition to Pause state. - Don't need to go into Pause state, since onPause() has been called before. - Don't need to call nativePause is SDLThread is already ended
Sylvain Becker 8dd91550 2019-01-09T23:19:26 Android: prevent a dummy error message sending SDL_DISPLAYEVENT_ORIENTATION In the usual case, first call to onNativeOrientationChanged() is done before SDL has been initialised and would just set an error message "Video subsystem has not been initialized" without sending the event.
Sylvain Becker 68c0e69f 2019-01-09T22:41:52 Android: native_window validity is guaranteed between surfaceCreated and Destroyed It's currently still available after surfaceDestroyed(). And available (but invalid) between surfaceCreated() and surfaceChanged(). Which means ANativewindow_getWidth/Height/Format() fail in those cases. https://developer.android.com/reference/android/view/SurfaceHolder.html#getSurface()
Sylvain Becker 59df6d6b 2019-01-07T17:06:50 Android: don't allow multiple instance of SDLActivity Default launch mode (standard) allows multiple instances of the SDLActivity. ( https://developer.android.com/guide/topics/manifest/activity-element#lmode ) Not sure this is intended in SDL as this doesn't work. There are static variables in Java, in C code which make this impossible (allow one android_window) and also Audio print errors. There is also some code added in onDestroy as if it would be able to re-initialize: https://hg.libsdl.org/SDL/rev/27686adb08c3 Bug Android activity life-cycle seems to show there is not transition to get out of onDestroy() https://developer.android.com/reference/android/app/Activity#ActivityLifecycle ( can be tested with "adb shell am start my.package.org/.MainActivity" and "adb shell am start -n my.package.org/.MainActivity" ) Send me a message if there are real use-case for this !
Sylvain Becker 911f1d3e 2019-01-05T22:49:50 Android: remove SURFACE_TYPE_GPU, deprecated in API level 5. https://developer.android.com/reference/android/view/SurfaceHolder This constant was deprecated in API level 5. this is ignored, this value is set automatically when needed.
Sylvain Becker a95f91bc 2019-01-02T18:06:33 Fixed bug 3250 - Wrong backbuffer pixel format on Android, keep getting RGB_565 Use the egl format to reconfigure java SurfaceView holder format. If there is a change, it triggers a surfaceDestroyed/Created/Change sequence.
Sylvain Becker a02998a2 2019-01-02T17:41:33 Android: make sure surfaceChanged try to enter into 'resumed' state.
Sylvain Becker 4d2b5c79 2019-01-02T17:08:01 Fixed bug 4424 - Android windowed mode is broken (Thanks Jonas Thiem!)
Sam Lantinga cc39c7a0 2018-11-02T17:25:00 Fixed bug 4320 - Android remove reflection for HIDDeviceBLESteamController Sylvain Uneeded use of reflection to access connectGatt method in HIDDeviceBLESteamController.java The method is API 23 https://developer.android.com/reference/android/bluetooth/BluetoothDevice.html#connectGatt(android.content.Context,%20boolean,%20android.bluetooth.BluetoothGattCallback,%20int)
Sam Lantinga 67a94893 2018-11-02T17:22:15 Fixed bug 4319 - Android remove reflection for PointerIcon Sylvain Since SDL2 min requirement is Android SDK 26, and PointerIcon is 24. We don't need reflection to access it.
Sam Lantinga e381a159 2018-10-28T10:31:06 Updated Android project files and documentation
Sam Lantinga b699ddc0 2018-10-23T12:40:25 Fixed reinitializing the SDL joystick subsystem on Android
Sam Lantinga d7fa1120 2018-10-22T14:55:47 Change our fullscreen wait logic to only wait if we need to. (thanks Rachel!)
Sam Lantinga e6068b5b 2018-10-22T14:55:45 Handle failure to load hidapi gracefully
Sam Lantinga 3e3ce6e9 2018-10-16T15:00:43 Fixed bug 4318 - Android move Haptic code to API26 class Sylvain - Create SDLHapticHandler_API26 - No need of reflection since SDL2 compile with Android 26 as a min requirement. - remove spaces
Sam Lantinga b0c48dd9 2018-10-16T08:29:27 Support vibration magnitude on Android 8.0 (thanks Rachel!)
Sam Lantinga f5a21ebf 2018-10-09T20:12:43 Added support for surround sound and float audio on Android
Sam Lantinga 4679f682 2018-10-09T20:12:40 Removed unneeded variable qualifiers
Sam Lantinga 337cea44 2018-10-08T12:49:30 Fixed life-cycle issues with two activities sharing HIDDeviceManager
Sam Lantinga 1e728f50 2018-10-08T12:49:28 Close on shutdown, for consistency
Sam Lantinga e4c9806f 2018-10-08T12:49:26 Trying to track down NullPointerException in USB input thread
Sam Lantinga a0c53668 2018-10-04T16:29:17 Allow SDL to use ReLinker if present. This fixes issues for applications that have a large number of shared libraries For more information, see https://github.com/KeepSafe/ReLinker for ReLinker's repository.
Sam Lantinga ae5317e8 2018-10-02T13:17:31 The Amlogic X96 is a set-top box
Sam Lantinga 679d3553 2018-10-01T14:52:28 Fixed UnsatisfiedLinkError when initializing the HIDDeviceManager in some cases
Sam Lantinga e77ec889 2018-09-29T02:14:46 Fixed tablet detection on Android
Sam Lantinga 74638ea3 2018-09-28T20:39:57 Ensure we wait on the surface resize before returning from setting fullscreen mode.
Sam Lantinga d40657bf 2018-09-25T20:11:52 Fixed bug 4270 - Android HIDDeviceManager function needs to be public Sylvain Can't run an android app without declaring the JNI interface function as public.
Sam Lantinga da89b81c 2018-09-24T20:31:24 Fixed rare null pointer dereference
Sam Lantinga e0fe8f3c 2018-09-24T11:53:04 Support relative mouse for Samsung DeX on Samsung Experience 9.5 or later (Android 8.1 or later)
Sam Lantinga c179d394 2018-09-17T12:08:05 Fixed NullPointerException if there's no singleton
Sam Lantinga 66294d31 2018-09-14T18:31:03 Guard against Steam Controller input when we're shutting down.
Sam Lantinga a0b3dcc2 2018-09-05T15:54:46 Fixed bug 4002 - Android, nativeRunMain() fails on some phone with arm64-v8a Sylvain The issue is totally reproducible on P8 Lite. "The dlopen() call doesn't include the app's native library directory. The behavior of dlopen() by Android is not guaranteed". Workaround in getMainSharedObject() Just replace return library; with return getContext().getApplicationInfo().nativeLibraryDir + "/" + library;
Sam Lantinga 09ab752a 2018-08-24T10:41:57 Implement SDL_HapticStopEffect on Android (thanks Rachel!)
Sam Lantinga a003fa0a 2018-08-23T14:05:25 Implemented SDL_GetDisplayOrientation() on Android (thanks Rachel!)
Sam Lantinga 38ae4988 2018-08-21T20:46:25 Updated required Android SDK to API 26, to match Google's new App Store requirements
Sam Lantinga c2791fc6 2018-08-21T11:59:13 Don't crash if the app doesn't have Bluetooth permissions
Sam Lantinga 2a4999b4 2018-08-21T11:44:08 By default just build for 32-bit ARM and x86
Sam Lantinga 109544ca 2018-08-21T11:23:47 Add SDL_IsTablet() to Android and iOS SDL.
Sam Lantinga b09b25f6 2018-08-21T11:07:56 Don't crash if the app doesn't have Bluetooth permissions
Sam Lantinga ad1e3c2a 2018-08-21T10:37:26 Fixed Android build error
Sam Lantinga cf823094 2018-08-09T16:04:25 The MINIX NEO-U1 is now being reported as Android TV
Sam Lantinga d2042e1e 2018-08-09T16:00:17 Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms. Added SDL_GameControllerRumble() and SDL_JoystickRumble() for simple force feedback outside of the SDL haptics API
Sam Lantinga fd8e8f9f 2018-07-13T12:55:50 Clean up captured pointer code to avoid logcat clutter on pre-8.0 systems (thanks Rachel!)
Sam Lantinga ff8c9538 2018-07-12T13:28:13 Allow trapping the back button so right mouse click can work on some Android systems (thanks Rachel!) Also, added a function SDL_AndroidBackButton() so applications can respond to the back button directly
Sam Lantinga a5158535 2018-06-18T13:14:02 Added support for external mouse in Samsung DeX mode relative mode doesn't work, but absolute coordinates are functional
Sam Lantinga f1d8f5f7 2018-06-18T13:14:00 Make certain we only hide system UI when we're fullscreen for real. (thanks Rachel!)
Sam Lantinga 8b574dc4 2018-06-18T13:13:58 Deal with situations where the system UI is shown when the keyboard pops up (thanks Rachel!)
Sam Lantinga 12ff19c0 2018-06-13T14:24:30 SDL Android fullscreen code extensively tested on Steam Link with no issues reported
Sam Lantinga 63317dfb 2018-06-07T17:07:05 Don't crash on exit from SDLActivity if we don't have a singleton for some reason. (Thanks Rachel!)
Sam Lantinga fe196db7 2018-06-07T17:07:03 Track android device panel width & height as well as window surface & height. Expand SDLActivity::SDLSurface::surfaceChanged() callback to grab the panel width and height at the same time and pass that along to the native code. Only works on API 17+. Duplicates surface dimensions whenever it fails. Add Android_DeviceWidth/Android_DeviceHeight globals to native code. Disambiguate Android_ScreenWidth/Android_ScreenHeight -> Android_SurfaceWidth/Android_SurfaceHeight Use device width/height for all display mode settings.
Sam Lantinga 77709aec 2018-06-06T09:42:12 Added Android hardware feature support to the default manifest
Sam Lantinga 7c5f3cf3 2018-06-05T14:08:39 Added improved mouse pointer capture under API 26. (Thanks Rachel!)
Sam Lantinga 113801b7 2018-06-05T12:46:13 Added SDL_IsChromebook() to determine if we're running on a Chromebook.
Sam Lantinga 03ff7dcf 2018-05-29T11:18:01 Added support for Android relative mouse mode on API 24 and above
Sam Lantinga 5d1d0357 2018-05-23T17:15:35 Better fix for axis sorting with some Android controllers
Sam Lantinga f536fbea 2018-03-16T11:08:53 Reimplemented Android cursor API support using reflection so it builds with older SDKs
Sam Lantinga e20d4173 2018-03-15T18:22:48 Added Android custom cursor implementation This is commented out in SDLActivity.java, with the note #CURSORIMPLEENTATION because it requires API 24, which is higher than the minimum required SDK
Sam Lantinga 9e651b69 2018-03-06T14:51:50 Try to dynamically create a default Android game controller mapping based on the buttons and axes on the controller. Include the controller USB VID/PID in the GUID where possible, as we do on other platforms.
Sam Lantinga 0df7fe84 2018-03-01T08:22:56 Temporarily disabled fullscreen switching code on Android, until we can resolve bug 4096 - Enabling fullscreen on Android causes the app to toggle fullscreen mode continuously in a loop
Sam Lantinga 6e01fbb7 2018-02-11T18:23:37 On Android show the system UI when an SDL window is windowed, hide the system UI when it's fullscreen, like we do on iOS. We're increasing the Android SDK minimum version to API 19, this doesn't increase the minimum target API, which is API 14.
Sam Lantinga 54340ab9 2018-02-07T15:10:50 Fixed bug 4021 - Android, hard-coded Keycode value Sylvain There is an hard-coded keycode value in SDLActivity.java
Sam Lantinga 6ed184ec 2018-02-06T15:03:35 Added SDL_IsAndroidTV()
Sam Lantinga fab2e246 2018-01-27T12:07:05 Removed armeabi from the SDL build API list, since it's not supported by the latest Android SDK
Cole Campbell b401cfd9 2018-01-09T19:11:34 Allow Android Java shim to be built as an AAR
Sam Lantinga 616827ae 2017-12-19T11:19:10 Fixed bug 4001 - Android, prevent error message box to crash Sylvain Prevent the error message box to crash after being clicked. Because of "SDLActivity.mSingleton.finish();"
Sam Lantinga b92e2f02 2017-12-19T10:57:21 Fixed bug 4004 - iOS: don't hide keyboard on RETURN Dominik Reichardt As discussed in 2012 the iOS onscreen keyboard hides when you hit RETURN (see https://discourse.libsdl.org/t/on-screen-keyboard-change/19216). IMO this is a bad idea to not be able to influence this behavior and just recently this was fixed for Android by adding the hint SDL_HINT_ANDROID_RETURN_HIDES_IME in changeset 11768 6ce3bb5e38a5.
Sam Lantinga 2afc0b7f 2017-12-12T12:52:23 Add the ability to set SDL to handle Return as 'hide IME' on Android softkeyboard. (thanks Rachel!)
Sam Lantinga c317ab97 2017-11-12T10:59:05 Fixed Android build error on older SDK
Sam Lantinga 50e422ad 2017-11-04T22:03:28 Fixed bug 3917 - Android, issues with getManifestEnvironmentVariable Sylvain What about getting some return code instead of creating another native function.
Sam Lantinga 758156a7 2017-11-04T09:37:29 Fixed bug 3917 - Android, issues with getManifestEnvironmentVariable We're going to push the manifest environment variables from the Java side instead of continually querying for them from the native side.
Sam Lantinga bb8c3a9c 2017-11-02T10:41:55 Make SDL fullscreen windows on Android actually fullscreen
Sam Lantinga 522901b8 2017-11-02T08:46:14 Fixed bug 3933 - Android, no need of the listener thread Sylvain A listener thread has been added to know when the native thread would end. But now, it is more easy to only check that after the main function has returned. It's one thread less.