android-project


Log

Author Commit Date CI Message
Sam Lantinga 68e1731e 2020-05-29T15:40:17 Don't bother logging security exception getting the device serial number This can happen anytime we haven't opened the device yet
Sockmonsters eea450bc 2020-05-29T15:37:03 - Added exception handler for the new SecurityException in USBDevice getSerialNumber
Sylvain Becker 33642b47 2020-05-08T21:50:23 Android: robustness if locale failed to be detected at start
Sylvain Becker 2491f16f 2020-05-08T21:40:28 Android: send SDL_LOCALECHANGED when locale changes
Sam Lantinga beab15b0 2020-04-27T19:12:02 Added additional logging to track down why the NVIDIA controller doesn't send the back button
Sam Lantinga 37faac0d 2020-03-05T08:43:16 Fixed java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.WindowManager android.app.Activity.getWindowManager()' on a null object reference
Sam Lantinga dc54add5 2020-02-14T18:21:58 Added some extra permissions and features likely to be used by SDL applications
Sam Lantinga 14bf532d 2020-02-13T16:10:52 Fixed opening audio on Android from the Steam Link shell activity
Sam Lantinga 4bb95e84 2020-02-11T16:14:02 Implemented OpenSL-ES audio recording on Android
Sam Lantinga 64c58b9f 2020-02-07T20:20:37 Fixed NullPointerException
Sam Lantinga c9c89783 2020-01-29T20:09:08 Miscellaneous pending fixes
Sam Lantinga 598cf694 2020-01-28T21:41:13 Fixed member order to make more sense
Sam Lantinga 43b377b0 2020-01-28T17:11:17 Fixed wired PS4 controller support on Android
Sam Lantinga ce7c51a9 2020-01-26T00:37:48 Always release devices in onPause in case we're going to be force stopped, and for consistency with interacting with other activities that might use the controller
Sam Lantinga 43aa1fa9 2020-01-18T11:21:14 Added support for detecting previously unknown Xbox 360 and Xbox One controllers using the HIDAPI driver with libusb and Android
Sylvain Becker d52ba78b 2020-01-17T12:04:18 Fixed bug 4246 - Android: orientation between portrait<->landscape doesn't work Improve handling of landscape/portrait orientation. Promote to SCREEN_ORIENTATION_SENSOR_* when needed. Android window can be somehow resizable. If SDL_WINDOW_RESIZABLE is set, window size change is allowed, for instance when orientation changes (provided the hint allows it).
Sam Lantinga 1d321850 2020-01-13T15:35:52 Added support for claiming individiual interfaces on USB devices on Android This is needed for supporting multiple wireless Xbox 360 controllers
Sam Lantinga a7bf6af8 2020-01-11T04:34:23 The Amlogic TVB-906X is Android TV
Sylvain Becker f050309e 2019-12-20T15:58:59 Android: fix IllegalStateException in onBackPressed() Rare exception, not catch-able, which appears when the activity gets in a broken state. java.lang.IllegalStateException: at android.app.FragmentManagerImpl.checkStateLoss (FragmentManagerImpl.java:1323) at android.app.FragmentManagerImpl.popBackStackImmediate (FragmentManagerImpl.java:493) at android.app.Activity.onBackPressed (Activity.java:2215) at org.libsdl.app.SDLActivity.onBackPressed (SDLActivity.java) at android.app.Activity.onKeyUp (Activity.java:2193) at android.view.KeyEvent.dispatch (KeyEvent.java:2685) at android.app.Activity.dispatchKeyEvent (Activity.java:2423) at org.libsdl.app.SDLActivity.dispatchKeyEvent (SDLActivity.java)
Sam Lantinga 15d30298 2019-12-19T15:01:32 Added support for wireless Xbox 360 controllers using the HIDAPI driver
Sylvain Becker 5d5a5671 2019-12-19T13:54:03 Fixed bug 4906 - Pressing Back button terminates app after SDL_StartTextInput
Sam Lantinga 7b2826f6 2019-12-17T12:03:57 Added Android support for the Hyperkin X91 and the SteelSeries Stratus Duo
Sam Lantinga d4e1c797 2019-11-27T17:17:03 Backed out changeset 36b79874a9c8, which fixed bug 4775 This change broke individual key events, so I'm reverting the change until we can investigate a better fix.
Sylvain Becker 59352cea 2019-10-23T11:25:16 Fixed bug 4775 - Japanese on Android, remove inputtype PASSWORD (Thanks Tamo!)
Sylvain Becker 0a9c74aa 2019-08-27T11:38:43 Fixed bug 3918 - HIDAPI, CMake support for android project
Sylvain Becker 7f9016f2 2019-08-15T20:38:25 Android: remove tabs/indent
Sylvain Becker 412775f5 2019-08-13T16:00:08 Android: SDL_image/SDL_mixer/SDL_ttf partially compiling with CMake (bug 3918)
Sylvain Becker 155087d1 2019-08-11T15:23:37 Fixed bug 3918 - CMake support for android project
Sam Lantinga e92fe23c 2019-08-02T17:20:00 Fix nullptr crash on android nullcheck the device coming back from InputDevice.getDevice(deviceId) in new code added to sdlactivity.onkey. java.lang.NullPointerException: at org.libsdl.app.SDLSurface.onKey (SDLActivity.java:1793) at android.view.View.dispatchKeyEvent (View.java:13321) at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1912) at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1912) at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1912) at android.view.ViewGroup.dispatchKeyEvent (ViewGroup.java:1912) at com.android.internal.policy.DecorView.superDispatchKeyEvent (DecorView.java:685) at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent (PhoneWindow.java:1869) at android.app.Activity.dispatchKeyEvent (Activity.java:3447) at org.libsdl.app.SDLActivity.dispatchKeyEvent (SDLActivity.java:496) @dang @saml @dave
Sylvain Becker f994da0e 2019-07-03T13:37:54 Fixed bug 4702 - Android back button does not send SDL_KEYDOWN event fallback when event.getSource() is SOURCE_UNKNOWN
Sylvain Becker 5418d416 2019-06-18T11:35:30 Android: prevent ignoring surfaceChanged() in MultiWindow
Sylvain Becker 4392c6ff 2019-06-11T11:01:15 Android: fix coordinates for Surface.ROTATION_180 https://discourse.libsdl.org/t/android-screen-orientation-issues-2-0-9/26262
Sylvain Becker 45a3dd17 2019-06-11T10:19:26 Android: revert wrong fix typo calling onBackPressed() (Bug 4657)
Sylvain Becker f9a9193e 2019-06-10T21:58:03 Android: add MinimizeWindow function (Bug 4580, 4657) shouldMinimizeOnFocusLoss is un-activated (return false)
Sylvain Becker 3f4e189b 2019-06-10T21:41:22 Android: fix typo calling onBackPressed() (Bug 4657)
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