Commit Graph

49 Commits

Author SHA1 Message Date
Anonymous Maarten
45dfdfbb7b Add parametrized build script
[ci skip]
2024-10-14 21:30:48 +02:00
Anonymous Maarten
349540f73f Document the new SDL3 Android archive artifact 2024-08-01 17:48:49 +00:00
Sam Lantinga
ca4bd4b63c Android life cycle behavior more closely matches iOS
This change also decouples the pause/resume handling from the video subsystem on Android, so applications that don't use SDL for video can get application life cycle events.

The semantics for the life cycle events are that they need to be handled in an event watch callback, and once they've been delivered, the application will block until it's been resumed. SDL_HINT_ANDROID_BLOCK_ON_PAUSE can be used to control that behavior, and if that's set to "0", then the application will continue to run in the background at low CPU usage until being resumed or stopped.

SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO has been removed, and the audio will be paused when the application is paused.

Fixes https://github.com/libsdl-org/SDL/issues/3193
2024-07-24 05:11:13 -07:00
Sam Lantinga
1c4cc2b024 Updated Android minimum API level to 21 (Android 5.0)
This is necessary for the window safe area support, and is a reasonable default for SDL 3.0
2024-07-23 17:06:04 -07:00
Sam Lantinga
54366181c3 Rename functions in SDL_system.h to match SDL 3.0 naming convention
Fixes https://github.com/libsdl-org/SDL/issues/10277
2024-07-15 16:27:48 -07:00
Ryan C. Gordon
8779c95905 android: Added SDL_AndroidGetCachePath().
Fixes #8408.
2024-07-12 15:41:54 -04:00
Anonymous Maarten
50ae47af5e android: create android project in create-android-project.py python script
This script supersedes androidbuild.sh, and also supports using a SDL3 prefab archive
2024-07-05 21:12:26 +02:00
Anonymous Maarten
45081db9d4 Build Android prefab in releaser.py script
[ci skip]
2024-05-22 01:28:44 +02:00
Ryan C. Gordon
5a21d87e69
rwops: Changed filenames that reference "rwops" to "iostream". 2024-03-14 23:30:59 -04:00
Ryan C. Gordon
f32575dfab
docs: Convert everything to Unix-style endlines.
Fixes #8640.
2023-11-29 11:29:57 -05:00
Sam Lantinga
1e9d314482 Updated to Android minSdkVersion 19 and targetSdkVersion 34
This is updated to meet the latest requirements for apps on the Google Play store
2023-08-24 08:23:06 -07:00
SDL Wiki Bot
a3a9019265 Sync SDL3 wiki -> header 2023-07-20 14:55:15 +00:00
Anonymous Maarten
a4bb4eef73 cmake: create Android jars + apks for tests 2023-07-20 16:54:29 +02:00
luzpaz
65e1d568ef Fix various typos (docs/build scripts/tests) 2023-07-03 08:35:37 -07:00
Sylvain
dfd80f3d76 Android: control activity re-creation 2023-05-12 07:48:33 -07:00
SDL Wiki Bot
8c852f4dcf Sync SDL3 wiki -> header 2023-03-25 22:11:16 +00:00
Karl Hedberg
11142ec256
Made the Android documentation more clear and understandable (#7535) 2023-03-25 15:10:04 -07:00
SDL Wiki Bot
60127460b0 Sync SDL3 wiki -> header 2023-02-28 17:30:22 +00:00
Sam Lantinga
7b50bae524 Renamed SDL events for clarity
Fixes https://github.com/libsdl-org/SDL/issues/6877
2023-01-24 07:26:48 -08:00
Daniel Gibson
ab554c8392 Update doc/README-* for header-only SDL_main 2022-12-15 08:01:01 -08:00
Sam Lantinga
c2432f8d0d Rename SDLmain to SDL_main and SDLtest to SDL_test for consistency with other SDL libraries 2022-11-28 10:57:59 -08:00
Sam Lantinga
5cfd26d0b9 Removed obsolete android-project-ant 2022-11-25 16:03:29 -08:00
Sam Lantinga
cc1f9eb983 Use Apple's nomenclature for macOS and iOS
Fixes https://github.com/libsdl-org/SDL/issues/6621
2022-11-25 16:00:06 -08:00
Sam Lantinga
2c4159b99a First pass at changing SDL 2.0 to SDL 3.0 2022-11-21 20:28:58 -08:00
Yevhen Babiichuk (DustDFG)
e6864d17b6 Update minimal required Android SDK version
Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
2022-08-24 11:39:32 -07:00
Sylvain
0ad606b48d
Android: add comment to set render target to NULL when going to background (bug #4041) 2022-03-14 10:43:18 +01:00
Sam Lantinga
599001d4c7 Revert "Removed reference to ant project."
This reverts commit 0cad302346.

The ant directory still exists in source control
2021-07-07 13:30:48 -07:00
Gianfranco Berardi
0cad302346 Removed reference to ant project.
The android-project-ant directory does not exist anymore.
2021-06-14 12:58:48 -07:00
Sylvain
30359a689f
Android: document workaround to use JNI on native thread (see bug #4406) 2021-06-01 20:11:59 +02:00
Cacodemon345
1899844952
Fix GitHub display of README-android.md 2021-03-21 01:15:14 +06:00
Sylvain Becker
d74779b748 Android: documention update 2021-02-10 10:22:19 -05:00
Sylvain Becker
155087d106 Fixed bug 3918 - CMake support for android project 2019-08-11 15:23:37 +02:00
Sylvain Becker
05333a6e9f Android: add hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE
to set whether the event loop will block itself when the app is paused.
2019-04-05 09:16:30 +02:00
Sam Lantinga
390459d83e Updated minimum supported Android version to API 16, to match latest NDK toolchain 2019-01-12 12:11:06 -08:00
Sylvain Becker
d09774a47c Fixed bug 3511 - documentation to end an Android application 2018-12-30 14:23:25 +01:00
Sam Lantinga
e381a1599d Updated Android project files and documentation 2018-10-28 10:31:06 -07:00
Sam Lantinga
38ae49880f Updated required Android SDK to API 26, to match Google's new App Store requirements 2018-08-21 20:46:25 -07:00
Sam Lantinga
6e01fbb763 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.
2018-02-11 18:23:37 -08:00
Sam Lantinga
fa5db3a931 Added the old ant Android build project structure 2017-10-28 12:11:25 -07:00
Sam Lantinga
edf0fae139 Updated Android build tools version, which bumped minimum deployment target to API 14
Also added native code to the Android gradle project, which allows using gradle or Android Studio to build the entire SDL application without a separate ndk-build step.
2017-10-23 23:23:47 -07:00
Sam Lantinga
f08480af78 Switched to new style gradle Android application build process 2017-10-23 15:23:43 -07:00
Sam Lantinga
6c38c9007b Update Android SDK required to API level 16
Sylvain

Some API 16 methods are used (InputDevice: getDescriptor(), getVibrator()), so we need to compile at least with SDK API 16. Hence default.properties and project.properties have been modified to use android-16.

There are also some modification to SDLActivity.java not to use getVibrator() if we run under API 16. And not to check to presence of hasVibrator() if we are under API 11.
-some hard-coded constant can be expandend.
- rename a local variable (hasVibrator to hasVibratorService)
2017-08-31 15:12:08 -07:00
Sam Lantinga
148ac5b3cf Added Matt Styles' tutorial on building SDL for Android with Visual Studio 2017-08-19 00:27:11 -07:00
Ryan C. Gordon
8ad131b78e readme: more HTTPS changes. 2017-02-16 13:55:12 -05:00
Philipp Wiesemann
1fd2646c60 Android: Split long line in README. 2016-10-15 20:01:50 +02:00
Sam Lantinga
d3cbc664d5 Fixed bug 2983 - Update Android.readme to include Tegra Graphics Debugger compatibility tip
Michael Labb?

NVidia has released some pretty nice Tegra profiling tools for their Android devices. The NVidia Tegra Graphics Debugger works by providing an interposer library that intercepts ES2 and EGL calls.  You must link against these libraries.

Unfortunately, this quietly fails with SDL2 because libEGL and libGLES2 are dynamically loaded with dlopen().

NVidia offers a secondary approach to using the Tegra Graphics Debugger: root your device and install a global interposer library.  Almost no devs will try this first if they don?t have a rooted device.

I propose an update to the Android readme that explains why the static linking approach recommended by NVidia doesn?t work.
2016-10-07 17:49:33 -07:00
Sam Lantinga
104c9541d9 Converted README documentation to DOS text format 2016-10-07 17:46:58 -07:00
Philipp Wiesemann
4011d991e7 Fixed doxygen warnings about markdown formatting. 2016-02-24 21:05:19 +01:00
Philipp Wiesemann
0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00