The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
Android SDL Joystick support needs API >= 12
Daniel Knobe
Guest

Hi,
I'm trying to build an app with SDL under Eclipse.
It's not possible to do this with the android-project shipped by SDL and
Android API10.
He allways wants an API >= 12. When I take the API10 (2.3.3) Eclipse
reports a lot of errors in the joystick implementation of SDLActivity.java.

Is SDL not compatible to 2.3.3? Or did I something wrong?

Best regards
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Android SDL Joystick support needs API >= 12
Jonny D


Joined: 12 Sep 2009
Posts: 932
You build it with API >= 12, but it should still work (without joystick support) on devices that have a lower API level.


Jonny D
Android SDL Joystick support needs API >= 12
Daniel Knobe
Guest

Ok, I thought that if I build it with API12, the .apk is not backwards-compatible with 2.3.3.
Am 15.03.2014 01:06, schrieb Jonathan Dearborn:

Quote:
You build it with API >= 12, but it should still work (without joystick support) on devices that have a lower API level.


Jonny D



Quote:
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Android SDL Joystick support needs API >= 12
Jonny D


Joined: 12 Sep 2009
Posts: 932
Yeah, I think the trick is that your AndroidManifest (what the device will check) should specify API level 10, but you keep "target=android-12" in your build files.

Jonny D
Android SDL Joystick support needs API >= 12
Eric Wing
Guest

On 3/14/14, Daniel Knobe wrote:
Quote:
Ok, I thought that if I build it with API12, the .apk is not
backwards-compatible with 2.3.3.

This is not true. (I have very strong opinions about how to do this
because I've been bitten hard by this.)

In the Android Manifest, there are two settings:
targetSdkVersion
minSDKVersion

Set the targetSdkVersion to the latest. Set the minSDKVersion to the
lowest version you want to support. It looks like SDL already does the
runtime safety check to avoid calling non-existent APIs on 2.3.

And when I say "latest", I really do mean latest. I strongly advocate
this because Android has runtime detection behavior that checks how it
is compiled and runs differently depending. While this is supposed to
avoid bugs, I found it actually causes different bugs. And it also
punishes people with newer OS versions with legacy behavior. (For
example when Project Butter brough hardware accelerated UI to 4.0, if
you were compiled with a lower targetSdkVersion, the code path was
disabled so you got both slower performance and I also found nasty
bugs they weren't testing for.)


-Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Android SDL Joystick support needs API >= 12
Eric Wing
Guest

Quote:
In the Android Manifest, there are two settings:
targetSdkVersion
minSDKVersion

For correctness, the capitalization is:
targetSdkVersion
minSdkVersion

-Eric
--
Beginning iPhone Games Development
http://playcontrol.net/iphonegamebook/
_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Android SDL Joystick support needs API >= 12
Daniel Knobe
Guest

Thanks for that great answer Smile!
Am 15.03.2014 02:14, schrieb Eric Wing:
Quote:
Quote:
In the Android Manifest, there are two settings:
targetSdkVersion
minSDKVersion
For correctness, the capitalization is:
targetSdkVersion
minSdkVersion

-Eric

_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org