We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1563

Summary: SDL does not support Android versions older than 2.2 (API 8).
Product: SDL Reporter: Philipp Wiesemann <philipp.wiesemann>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Android (All)   
Attachments: patch for SDLActivity.java

Description Philipp Wiesemann 2012-08-03 11:29:23 UTC
Created attachment 918 [details]
patch for SDLActivity.java

Hello,

SDL 2.0 (HG) does not support versions of Android older than 2.2 (API 8) because it uses two newer "convenience methods" [1][2] in SDLActivity.java.

In SDL's README.android the mentioned version is 1.6 (API 4) and in default.properties it is API 5 (which is more true). Both are currently not supported.

I attached a patch which inlines both methods and makes SDL usable with older Android versions again.

[1] http://developer.android.com/reference/android/view/MotionEvent.html#getActionIndex%28%29
[2] http://developer.android.com/reference/android/view/MotionEvent.html#getActionMasked%28%29
Comment 1 Ryan C. Gordon 2012-08-03 21:05:10 UTC
This patch is now hg changeset 0aa624a37ad4, thanks!

--ryan.