# Minimal supported android version

**URL:** <https://discourse.libsdl.org/t/minimal-supported-android-version/19488>\
**Category:** SDL Development\
**Created:** [March 28, 2013, 8:22pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488 "2013-03-28T20:22:19Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexey\_Petruchik](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/alexey_petruchik/32/2457_2.png) [@Alexey\_Petruchik](https://discourse.libsdl.org/u/Alexey_Petruchik)\
**Post date:** [March 28, 2013, 8:22pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/1 "2013-03-28T20:22:19Z")

</div>

In recent commit 9cef1005df5f in file project.properties in  
android-project folder line “target=android-10” was changed to  
"target=android-12"

Does it mean that 2.3.3 (api level 10) is not supported anymore?

Regards, Alexey

---

<div class="post-metadata">

**Author:** ![Gabriel\_Jacobo](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/gabriel_jacobo/32/1968_2.png) [@Gabriel\_Jacobo](https://discourse.libsdl.org/u/Gabriel_Jacobo)\
**Post date:** [March 28, 2013, 8:32pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/2 "2013-03-28T20:32:36Z")

</div>

2013/3/28 Alexey Petruchik

> In recent commit 9cef1005df5f in file project.properties in  
> android-project folder line “target=android-10” was changed to  
> “target=android-12”
> 
> Does it mean that 2.3.3 (api level 10) is not supported anymore?
> 
> Regards, Alexey

It’s probably an oversight, API level \<=10 devices comprise more than 50%  
of the market. [Distribution dashboard &nbsp;|&nbsp; Platform &nbsp;|&nbsp; Android Developers](http://developer.android.com/about/dashboards/index.html)

Can you confirm if that changeset compiles with the target level set to 10 ?–  
Gabriel.

---

<div class="post-metadata">

**Author:** ![John6](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/j/b5e925/32.png) [@John6](https://discourse.libsdl.org/u/John6)\
**Post date:** [March 28, 2013, 8:45pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/3 "2013-03-28T20:45:14Z")

</div>

SDL works if you change it to 10 (something recently broke 8, but IIRC it was  
easy to work around.)On 03/28/2013 04:32 PM, Gabriel Jacobo wrote:

> 2013/3/28 Alexey Petruchik \<i100500 at [gmail.com](http://gmail.com) \<mailto:i100500 at [gmail.com](http://gmail.com)\>\>
> 
> ```
> In recent commit 9cef1005df5f in file project.properties in
> android-project folder line "target=android-10" was changed to
> "target=android-12"
> 
> Does it mean that 2.3.3 (api level 10) is not supported anymore?
> 
> Regards, Alexey
> 
> ```
> 
> It’s probably an oversight, API level \<=10 devices comprise more than 50% of the  
> market. [Distribution dashboard &nbsp;|&nbsp; Platform &nbsp;|&nbsp; Android Developers](http://developer.android.com/about/dashboards/index.html)
> 
> Can you confirm if that changeset compiles with the target level set to 10 ?
> 
> –  
> Gabriel.
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![JonnyD](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/jonnyd/32/1604_2.png) [@JonnyD](https://discourse.libsdl.org/u/JonnyD)\
**Post date:** [March 29, 2013, 4:05am UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/4 "2013-03-29T04:05:45Z")

</div>

No, since that joystick changeset, it doesn’t work for me with API level \<  
12.

Jonny DOn Thu, Mar 28, 2013 at 4:45 PM, John wrote:

> SDL works if you change it to 10 (something recently broke 8, but IIRC it  
> was easy to work around.)
> 
> On 03/28/2013 04:32 PM, Gabriel Jacobo wrote:
> 
> > 2013/3/28 Alexey Petruchik \<i100500 at [gmail.com](http://gmail.com) \<mailto:i100500 at [gmail.com](http://gmail.com)\>\>
> > 
> > ```
> > In recent commit 9cef1005df5f in file project.properties in
> > android-project folder line "target=android-10" was changed to
> > "target=android-12"
> > 
> > Does it mean that 2.3.3 (api level 10) is not supported anymore?
> > 
> > Regards, Alexey
> > 
> > ```
> > 
> > It’s probably an oversight, API level \<=10 devices comprise more than 50%  
> > of the  
> > market. [http://developer.android.com/\*\*about/dashboards/index.html](http://developer.android.com/**about/dashboards/index.html)[http://developer.android.com/about/dashboards/index.html](http://developer.android.com/about/dashboards/index.html)
> > 
> > Can you confirm if that changeset compiles with the target level set to  
> > 10 ?
> > 
> > –  
> > Gabriel.
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\__ **\*\*** _  
> > SDL mailing list  
> > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > [http://lists.libsdl.org/\*\*listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org)[http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\__ **\*\*** _  
> > SDL mailing list  
> > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > [http://lists.libsdl.org/\*\*listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org)[http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![Alexey\_Petruchik](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/alexey_petruchik/32/2457_2.png) [@Alexey\_Petruchik](https://discourse.libsdl.org/u/Alexey_Petruchik)\
**Post date:** [March 31, 2013, 2:17pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/5 "2013-03-31T14:17:02Z")

</div>

Same for me. It doesn’t work until I specified in AndroidManifest.xml. So special check  
“if(Build.VERSION.SDK\_INT \>= 12) {” in SDLActivity.java seems to be  
not working :(On Fri, Mar 29, 2013 at 7:05 AM, Jonathan Dearborn wrote:

> No, since that joystick changeset, it doesn’t work for me with API level \<  
> 12.
> 
> Jonny D
> 
> On Thu, Mar 28, 2013 at 4:45 PM, John wrote:
> 
> > SDL works if you change it to 10 (something recently broke 8, but IIRC it  
> > was easy to work around.)
> > 
> > On 03/28/2013 04:32 PM, Gabriel Jacobo wrote:
> > 
> > > 2013/3/28 Alexey Petruchik \<i100500 at [gmail.com](http://gmail.com) \<mailto:i100500 at [gmail.com](http://gmail.com)\>\>
> > > 
> > > ```
> > > In recent commit 9cef1005df5f in file project.properties in
> > > android-project folder line "target=android-10" was changed to
> > > "target=android-12"
> > > 
> > > Does it mean that 2.3.3 (api level 10) is not supported anymore?
> > > 
> > > Regards, Alexey
> > > 
> > > ```
> > > 
> > > It’s probably an oversight, API level \<=10 devices comprise more than 50%  
> > > of the  
> > > market. [Distribution dashboard &nbsp;|&nbsp; Platform &nbsp;|&nbsp; Android Developers](http://developer.android.com/about/dashboards/index.html)
> > > 
> > > Can you confirm if that changeset compiles with the target level set to  
> > > 10 ?
> > > 
> > > –  
> > > Gabriel.
> > > 
> > > * * *
> > > 
> > > SDL mailing list  
> > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > 
> > * * *
> > 
> > SDL mailing list  
> > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![Gabriel\_Jacobo](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/gabriel_jacobo/32/1968_2.png) [@Gabriel\_Jacobo](https://discourse.libsdl.org/u/Gabriel_Jacobo)\
**Post date:** [April 1, 2013, 4:25pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/6 "2013-04-01T16:25:41Z")

</div>

The change has been reverted, everything seems to be working here but if  
you spot any problems let me know.

2013/3/31 Alexey Petruchik \> Same for me. It doesn’t work until I specified \<uses-sdk

> android:minSdkVersion=“12” /\> in AndroidManifest.xml. So special check  
> “if(Build.VERSION.SDK\_INT \>= 12) {” in SDLActivity.java seems to be  
> not working ☹
> 
> On Fri, Mar 29, 2013 at 7:05 AM, Jonathan Dearborn wrote:
> 
> > No, since that joystick changeset, it doesn’t work for me with API level  
> > \<  
> > 12.
> > 
> > Jonny D
> > 
> > On Thu, Mar 28, 2013 at 4:45 PM, John wrote:
> > 
> > > SDL works if you change it to 10 (something recently broke 8, but IIRC  
> > > it  
> > > was easy to work around.)
> > > 
> > > On 03/28/2013 04:32 PM, Gabriel Jacobo wrote:
> > > 
> > > > 2013/3/28 Alexey Petruchik \<i100500 at [gmail.com](http://gmail.com) \<mailto:  
> > > > i100500 at [gmail.com](http://gmail.com)\>\>
> > > > 
> > > > ```
> > > > In recent commit 9cef1005df5f in file project.properties in
> > > > android-project folder line "target=android-10" was changed to
> > > > "target=android-12"
> > > > 
> > > > Does it mean that 2.3.3 (api level 10) is not supported anymore?
> > > > 
> > > > Regards, Alexey
> > > > 
> > > > ```
> > > > 
> > > > It’s probably an oversight, API level \<=10 devices comprise more than  
> > > > 50%  
> > > > of the  
> > > > market. [Distribution dashboard &nbsp;|&nbsp; Platform &nbsp;|&nbsp; Android Developers](http://developer.android.com/about/dashboards/index.html)
> > > > 
> > > > Can you confirm if that changeset compiles with the target level set to  
> > > > 10 ?
> > > > 
> > > > –  
> > > > Gabriel.
> > > > 
> > > > * * *
> > > > 
> > > > SDL mailing list  
> > > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > > 
> > > * * *
> > > 
> > > SDL mailing list  
> > > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > 
> > * * *
> > 
> > SDL mailing list  
> > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

–  
Gabriel.

---

<div class="post-metadata">

**Author:** ![John6](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/j/b5e925/32.png) [@John6](https://discourse.libsdl.org/u/John6)\
**Post date:** [April 1, 2013, 4:55pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/7 "2013-04-01T16:55:28Z")

</div>

It still doesn’t compile against Android SDK level 10.On 04/01/2013 12:25 PM, Gabriel Jacobo wrote:

> The change has been reverted, everything seems to be working here but if you  
> spot any problems let me know.
> 
> 2013/3/31 Alexey Petruchik \<i100500 at [gmail.com](http://gmail.com) \<mailto:i100500 at [gmail.com](http://gmail.com)\>\>
> 
> ```
> Same for me. It doesn't work until I specified <uses-sdk
> android:minSdkVersion="12" /> in AndroidManifest.xml. So special check
> "if(Build.VERSION.SDK_INT >= 12) {" in SDLActivity.java seems to be
> not working :(
> 
> On Fri, Mar 29, 2013 at 7:05 AM, Jonathan Dearborn <grimfang4 at gmail.com <mailto:grimfang4 at gmail.com>> wrote:
> > No, since that joystick changeset, it doesn't work for me with API level <
> > 12.
> >
> > Jonny D
> >
> >
> > On Thu, Mar 28, 2013 at 4:45 PM, John <@John6 <mailto:@John6>> wrote:
> >>
> >> SDL works if you change it to 10 (something recently broke 8, but IIRC it
> >> was easy to work around.)
> >>
> >> On 03/28/2013 04:32 PM, Gabriel Jacobo wrote:
> >>>
> >>>
> >>>
> >>>
> >>> 2013/3/28 Alexey Petruchik <i100500 at gmail.com
> <mailto:i100500 at gmail.com> <mailto:i100500 at gmail.com
> <mailto:i100500 at gmail.com>>>
> >>>
> >>>
> >>> In recent commit 9cef1005df5f in file project.properties in
> >>> android-project folder line "target=android-10" was changed to
> >>> "target=android-12"
> >>>
> >>> Does it mean that 2.3.3 (api level 10) is not supported anymore?
> >>>
> >>> Regards, Alexey
> >>>
> >>>
> >>>
> >>> It's probably an oversight, API level <=10 devices comprise more than 50%
> >>> of the
> >>> market. http://developer.android.com/about/dashboards/index.html
> >>>
> >>> Can you confirm if that changeset compiles with the target level set to
> >>> 10 ?
> >>>
> >>> --
> >>> Gabriel.
> >>>
> >>>
> >>> _______________________________________________
> >>> SDL mailing list
> >>> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> >>> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >>>
> >> _______________________________________________
> >> SDL mailing list
> >> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> >> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >
> >
> >
> > _______________________________________________
> > SDL mailing list
> > SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> > http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> >
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
> 
> ```
> 
> –  
> Gabriel.
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [April 2, 2013, 6:04am UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/8 "2013-04-02T06:04:07Z")

</div>

I just updated to the latest changes and it’s compiling and working here.On Mon, Apr 1, 2013 at 9:55 AM, John wrote:

> It still doesn’t compile against Android SDK level 10.
> 
> On 04/01/2013 12:25 PM, Gabriel Jacobo wrote:
> 
> > The change has been reverted, everything seems to be working here but if  
> > you  
> > spot any problems let me know.
> > 
> > 2013/3/31 Alexey Petruchik \<i100500 at [gmail.com](http://gmail.com) \<mailto:i100500 at [gmail.com](http://gmail.com)\>\>
> > 
> > ```
> > Same for me. It doesn't work until I specified <uses-sdk
> > android:minSdkVersion="12" /> in AndroidManifest.xml. So special check
> > "if(Build.VERSION.SDK_INT >= 12) {" in SDLActivity.java seems to be
> > not working :(
> > 
> > On Fri, Mar 29, 2013 at 7:05 AM, Jonathan Dearborn < grimfang4 at gmail.com <mailto:grimfang4 at gmail.com>> wrote:
> > > No, since that joystick changeset, it doesn't work for me with API
> > 
> > ```
> > 
> > level \<  
> > \> 12.  
> > \>  
> > \> Jonny D  
> > \>  
> > \>  
> > \> On Thu, Mar 28, 2013 at 4:45 PM, John \<john at [leafygreengames.com](http://leafygreengames.com) \<mailto:john at leafygreengames.\*\*com \>\> wrote:  
> > \>\>  
> > \>\> SDL works if you change it to 10 (something recently broke 8, but  
> > IIRC it  
> > \>\> was easy to work around.)  
> > \>\>  
> > \>\> On 03/28/2013 04:32 PM, Gabriel Jacobo wrote:  
> > \>\>\>  
> > \>\>\>  
> > \>\>\>  
> > \>\>\>  
> > \>\>\> 2013/3/28 Alexey Petruchik \<i100500 at [gmail.com](http://gmail.com)  
> > \<mailto:i100500 at [gmail.com](http://gmail.com)\> \<mailto:i100500 at [gmail.com](http://gmail.com)
> > 
> > ```
> > <mailto:i100500 at gmail.com>>>
> > >>>
> > >>>
> > >>> In recent commit 9cef1005df5f in file project.properties in
> > >>> android-project folder line "target=android-10" was changed
> > 
> > ```
> > 
> > to  
> > \>\>\> “target=android-12”  
> > \>\>\>  
> > \>\>\> Does it mean that 2.3.3 (api level 10) is not supported  
> > anymore?  
> > \>\>\>  
> > \>\>\> Regards, Alexey  
> > \>\>\>  
> > \>\>\>  
> > \>\>\>  
> > \>\>\> It’s probably an oversight, API level \<=10 devices comprise more  
> > than 50%  
> > \>\>\> of the  
> > \>\>\> market. [http://developer.android.com/](http://developer.android.com/)\*\*  
> > about/dashboards/index.html[http://developer.android.com/about/dashboards/index.html](http://developer.android.com/about/dashboards/index.html)  
> > \>\>\>  
> > \>\>\> Can you confirm if that changeset compiles with the target level  
> > set to  
> > \>\>\> 10 ?  
> > \>\>\>  
> > \>\>\> –  
> > \>\>\> Gabriel.  
> > \>\>\>  
> > \>\>\>  
> > \>\>\> \_\_\_\_\_\_\_\_\_\_\_\_\__ **\*\*** _  
> > \>\>\> SDL mailing list  
> > \>\>\> SDL at [lists.libsdl.org](http://lists.libsdl.org) \<mailto:SDL at [lists.libsdl.org](http://lists.libsdl.org)\>
> > 
> > ```
> > >>> http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org<http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org>
> > >>>
> > >> ______________________________**_________________
> > >> SDL mailing list
> > >> SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> > 
> > >> http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org<http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org>
> > >
> > >
> > >
> > > ______________________________**_________________
> > > SDL mailing list
> > > SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> > 
> > > http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org<http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org>
> > >
> > ______________________________**_________________
> > SDL mailing list
> > SDL at lists.libsdl.org <mailto:SDL at lists.libsdl.org>
> > http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org<http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org>
> > 
> > ```
> > 
> > –  
> > Gabriel.
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\__ **\*\*** _  
> > SDL mailing list  
> > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > [http://lists.libsdl.org/\*\*listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org)[http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> > 
> > \_\_\_\_\_\_\_\_\_\_\_\_\__ **\*\*** _  
> > SDL mailing list  
> > SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> > [http://lists.libsdl.org/\*\*listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org)[http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![NY00123](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/n/ea5d25/32.png) [@NY00123](https://discourse.libsdl.org/u/NY00123)\
**Post date:** [April 3, 2013, 7:17am UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/9 "2013-04-03T07:17:48Z")

</div>

Wait a minute! 🙂

It seems to me people think API level 10 is not supported when the  
joystick patch is applied, but that should not be the case.  
The _minimal_ API level is 10 even when the joystick patch is applied.  
When the target API is set to 12, you may need to build an Android  
package against that, but afterwards it should be runnable on devices  
powered by Android 2.3.3 and later.

On a side note, I do agree with reverting the patch, although for  
different reasons:

- There are apps out there that use the SDL Joystick interface for  
reading accelerometer input, and they get broken when the patch is  
applied. Truly, it may not make sense to read accelerometer input in  
such a way and we may not have a true “stable” release of SDL 2.0, but  
this is the situation for now. In theory, an update to the patch  
retaining compatibility with these (say, with some SDL hint) should work.
- (Not sure about this:) When one changes the target API, a few things  
may change when it comes to the way the app behaves. See this for an  
example: [http://techblog.rokoder.com/android-missing-menu-button/](http://techblog.rokoder.com/android-missing-menu-button/)

---

<div class="post-metadata">

**Author:** ![RodrigoCard](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/r/3bc359/32.png) [@RodrigoCard](https://discourse.libsdl.org/u/RodrigoCard)\
**Post date:** [April 3, 2013, 3:56pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/10 "2013-04-03T15:56:24Z")

</div>

Exactly!

Removing joystick support is not necessary. There is another way to fix that.  
If this is not true, GTA 3 and a lot of other games wouldnt work on Android 2.3.3 AND have Game controller support (when running int Android 3+)

NY00123 wrote:\> Wait a minute! 🙂

> It seems to me people think API level 10 is not supported when the  
> joystick patch is applied, but that should not be the case.  
> The _minimal_ API level is 10 even when the joystick patch is applied.  
> When the target API is set to 12, you may need to build an Android  
> package against that, but afterwards it should be runnable on devices  
> powered by Android 2.3.3 and later.
> 
> On a side note, I do agree with reverting the patch, although for  
> different reasons:
> 
> - There are apps out there that use the SDL Joystick interface for  
> reading accelerometer input, and they get broken when the patch is  
> applied. Truly, it may not make sense to read accelerometer input in  
> such a way and we may not have a true “stable” release of SDL 2.0, but  
> this is the situation for now. In theory, an update to the patch  
> retaining compatibility with these (say, with some SDL hint) should work.
> - (Not sure about this:) When one changes the target API, a few things  
> may change when it comes to the way the app behaves. See this for an  
> example: [http://techblog.rokoder.com/android-missing-menu-button/](http://techblog.rokoder.com/android-missing-menu-button/)
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

* * *

Rodrigo Cardoso Rocha  
@RodrigoRodrigoR - [x.com](http://twitter.com/RodrigoRodrigoR)  
Chibata Creations - [chibatacreations.com](http://chibatacreations.com)  
Joystick Mapper for Mac - [joystickmapper.com](http://joystickmapper.com)

---

<div class="post-metadata">

**Author:** ![JonnyD](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/jonnyd/32/1604_2.png) [@JonnyD](https://discourse.libsdl.org/u/JonnyD)\
**Post date:** [April 3, 2013, 5:23pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/11 "2013-04-03T17:23:59Z")

</div>

Did you try building it with min API 10 and target API \> 12? Sure, there  
should be a way to make it work, but it didn’t.

Jonny DOn Wed, Apr 3, 2013 at 11:56 AM, RodrigoCard wrote:

> \*\*  
> Exactly!
> 
> Removing joystick support is not necessary. There is another way to fix  
> that.  
> If this is not true, GTA 3 and a lot of other games wouldnt work on  
> Android 2.3.3 AND have Game controller support (when running int Android 3+)
> 
> NY00123 wrote:
> 
> Wait a minute! [image: Smile]
> 
> It seems to me people think API level 10 is not supported when the  
> joystick patch is applied, but that should not be the case.  
> The _minimal_ API level is 10 even when the joystick patch is applied.  
> When the target API is set to 12, you may need to build an Android  
> package against that, but afterwards it should be runnable on devices  
> powered by Android 2.3.3 and later.
> 
> On a side note, I do agree with reverting the patch, although for  
> different reasons:
> 
> - There are apps out there that use the SDL Joystick interface for  
> reading accelerometer input, and they get broken when the patch is  
> applied. Truly, it may not make sense to read accelerometer input in  
> such a way and we may not have a true “stable” release of SDL 2.0, but  
> this is the situation for now. In theory, an update to the patch  
> retaining compatibility with these (say, with some SDL hint) should work.
> - (Not sure about this:) When one changes the target API, a few things  
> may change when it comes to the way the app behaves. See this for an  
> example: [http://techblog.rokoder.com/android-missing-menu-button/](http://techblog.rokoder.com/android-missing-menu-button/)
> 
> * * *
> 
> SDL mailing list
> 
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> 
> * * *
> 
> Rodrigo Cardoso Rocha  
> @RodrigoRodrigoR - [x.com](http://twitter.com/RodrigoRodrigoR)  
> Chibata Creations - [chibatacreations.com](http://chibatacreations.com)  
> Joystick Mapper for Mac - [joystickmapper.com](http://joystickmapper.com)
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![NY00123](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/n/ea5d25/32.png) [@NY00123](https://discourse.libsdl.org/u/NY00123)\
**Post date:** [April 3, 2013, 7:27pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/12 "2013-04-03T19:27:58Z")

</div>

Alright, I think we have a case of double meaning.

Basically, when one says that API level 10 support is desired, this can  
be interpreted as one of the following:

- Let an app run on Android devices powered by Android 2.3.3 and later.
- Build an Android app against API level 10 (i.e. set this as the target  
API).

With the former interpretation in mind, the joystick patch should work.  
It does not work with the latter one, though.

If it is important to let ones build against older APIs (which must be  
the case for some of the currently available apps), it may be required  
to supply multiple SDL Activity files, with classes inheriting from one  
super class with shared code. For instance, we could have a class named  
SDLActivityCommon and two subclasses SDLActivity10 and SDLActivity12.  
The default one should probably be SDLActivity12, while SDLActivity10  
can optionally be used for existing apps. (I believe simple edits of the  
activity name in AndroidManifest.xml and build.xml should do the job?)  
Of course, whenever there is a good reason to support a newer API level  
as a target (for cases like the one encountered with the joystick  
patch), a new activity subclass can be added in a similar fashion.

---

<div class="post-metadata">

**Author:** ![JonnyD](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/jonnyd/32/1604_2.png) [@JonnyD](https://discourse.libsdl.org/u/JonnyD)\
**Post date:** [April 3, 2013, 8:19pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/13 "2013-04-03T20:19:44Z")

</div>

Yeah, we weren’t saying the same thing, but it’s still not clear (I’m not  
an Android expert). It could be that I tried it by changing the target in  
the wrong place.

There are three important places to specify API level. Two are in the  
AndroidManifest.xml (uses-sdk android:minSdkVersion  
and android:targetSdkVersion) and the other is in the \*.properties files  
(target). I don’t mind sounding dumb by restating what might be obvious.  
To make everything clear, is the following correct?

android:minSdkVersion prevents installation of the apk on any lower API  
level device.  
android:targetSdkVersion disables forward-compatibility features on devices  
up to that API level (because you are explicitly telling it that the app  
works right).  
target tells the build system (Ant or Eclipse ADT) which API to actually  
build against.  
If the code uses features from higher API levels, it should wrap those with  
the Build.VERSION tests. You still need to set the target to build against  
the highest of those API levels.

Jonny DOn Wed, Apr 3, 2013 at 3:27 PM, NY00123 wrote:

> Alright, I think we have a case of double meaning.
> 
> Basically, when one says that API level 10 support is desired, this can be  
> interpreted as one of the following:
> 
> - Let an app run on Android devices powered by Android 2.3.3 and later.
> - Build an Android app against API level 10 (i.e. set this as the target  
> API).
> 
> With the former interpretation in mind, the joystick patch should work. It  
> does not work with the latter one, though.
> 
> If it is important to let ones build against older APIs (which must be the  
> case for some of the currently available apps), it may be required to  
> supply multiple SDL Activity files, with classes inheriting from one super  
> class with shared code. For instance, we could have a class named  
> SDLActivityCommon and two subclasses SDLActivity10 and SDLActivity12. The  
> default one should probably be SDLActivity12, while SDLActivity10 can  
> optionally be used for existing apps. (I believe simple edits of the  
> activity name in AndroidManifest.xml and build.xml should do the job?)  
> Of course, whenever there is a good reason to support a newer API level as  
> a target (for cases like the one encountered with the joystick patch), a  
> new activity subclass can be added in a similar fashion.
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\__ **\*\*** _  
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/\*\*listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/**listinfo.cgi/sdl-libsdl.org)[http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![John6](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/j/b5e925/32.png) [@John6](https://discourse.libsdl.org/u/John6)\
**Post date:** [April 3, 2013, 9:06pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/14 "2013-04-03T21:06:58Z")

</div>

Here’s the correct way to do it as I understand it,

1. clean your build environment via `ant clean` or else you get weird issues  
when switching target versions.

2. set minSdkVersion=“10” and targetSdkVersion=“12” in AndroidManifest.xml

3. Update your project “target\_id” to match the targetSdkVersion. Note that the  
target\_id is a string, “android-12”, not the number “12”. Be careful with that.  
You can get a list of target\_ids from `android list targets`. The command line  
to update the target is,

This will modify the target in “project.properties” and the app name in the .xml  
file(s).

When doing this with the joystick patches, you should see this in your adb log  
when you run the app on a platform 10 device. Note the failures to load the platform 12 API methods and classes at startup:

D/ActivityManager( 1387): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 pkg=com.LeafyGreenGames.sol2 cmp=com.LeafyGreenGames.sol2/.LGGActivity } from pid 1481  
I/ActivityManager( 1387): Start proc com.LeafyGreenGames.sol2 for activity com.LeafyGreenGames.sol2/.LGGActivity: pid=14520 uid=10026 gids={}  
I/LAB126 ( 1455): StatusBarService hears intent. action: com.lab126.intent.TOP\_WINDOW\_CHANGED  
I/LAB126 ( 1455): window changed  
I/LAB126 ( 1455): don’t set softkey config for ‘Starting…’ window  
I/dalvikvm(14520): Could not find method android.view.InputDevice.getMotionRanges, referenced from method com.LeafyGreenGames.sol2.LGGActivity.joystickInit  
W/dalvikvm(14520): VFY: unable to resolve virtual method 29: Landroid/view/InputDevice;.getMotionRanges ()Ljava/util/List;  
D/dalvikvm(14520): VFY: replacing opcode 0x6e at 0x0040  
D/dalvikvm(14520): VFY: dead code 0x0043-0067 in Lcom/LeafyGreenGames/sol2/LGGActivity;.joystickInit ()V  
D/dalvikvm(14520): Trying to load lib /data/data/com.LeafyGreenGames.sol2/lib/libSDL2.so 0x40514768  
D/dalvikvm(14520): Added shared lib /data/data/com.LeafyGreenGames.sol2/lib/libSDL2.so 0x40514768  
D/dalvikvm(14520): Trying to load lib /data/data/com.LeafyGreenGames.sol2/lib/libmain.so 0x40514768  
D/dalvikvm(14520): Added shared lib /data/data/com.LeafyGreenGames.sol2/lib/libmain.so 0x40514768  
D/dalvikvm(14520): No JNI\_OnLoad found in /data/data/com.LeafyGreenGames.sol2/lib/libmain.so 0x40514768, skipping init  
I/dalvikvm(14520): Failed resolving Lcom/LeafyGreenGames/sol2/SDLSurface$SDLOnGenericMotionListener; interface 28 ‘Landroid/view/View$OnGenericMotionListener;’  
W/dalvikvm(14520): Link of class ‘Lcom/LeafyGreenGames/sol2/SDLSurface$SDLOnGenericMotionListener;’ failed  
E/dalvikvm(14520): Could not find class ‘com.LeafyGreenGames.sol2.SDLSurface$SDLOnGenericMotionListener’, referenced from method com.LeafyGreenGames.sol2.SDLSurface.  
W/dalvikvm(14520): VFY: unable to resolve new-instance 54 (Lcom/LeafyGreenGames/sol2/SDLSurface$SDLOnGenericMotionListener;) in Lcom/LeafyGreenGames/sol2/SDLSurface;  
D/dalvikvm(14520): VFY: replacing opcode 0x22 at 0x0022  
D/dalvikvm(14520): VFY: dead code 0x0024-002a in Lcom/LeafyGreenGames/sol2/SDLSurface;. (Landroid/content/Context;)V  
I/SDL (14520): SDL\_Android\_Init()On 04/03/2013 04:19 PM, Jonathan Dearborn wrote:

> Yeah, we weren’t saying the same thing, but it’s still not clear (I’m not an  
> Android expert). It could be that I tried it by changing the target in the  
> wrong place.
> 
> There are three important places to specify API level. Two are in the  
> AndroidManifest.xml (uses-sdk android:minSdkVersion and  
> android:targetSdkVersion) and the other is in the \*.properties files  
> (target). I don’t mind sounding dumb by restating what might be obvious.  
> To make everything clear, is the following correct?
> 
> android:minSdkVersion prevents installation of the apk on any lower API  
> level device. android:targetSdkVersion disables forward-compatibility  
> features on devices up to that API level (because you are explicitly telling  
> it that the app works right). target tells the build system (Ant or Eclipse  
> ADT) which API to actually build against. If the code uses features from  
> higher API levels, it should wrap those with the Build.VERSION tests. You  
> still need to set the target to build against the highest of those API  
> levels.
> 
> Jonny D
> 
> On Wed, Apr 3, 2013 at 3:27 PM, NY00123 \<ny00 at [outlook.com](http://outlook.com) \<mailto:ny00 at [outlook.com](http://outlook.com)\>\> wrote:
> 
> Alright, I think we have a case of double meaning.
> 
> Basically, when one says that API level 10 support is desired, this can be  
> interpreted as one of the following: \* Let an app run on Android devices  
> powered by Android 2.3.3 and later. \* Build an Android app against API level  
> 10 (i.e. set this as the target API).
> 
> With the former interpretation in mind, the joystick patch should work. It  
> does not work with the latter one, though.
> 
> If it is important to let ones build against older APIs (which must be the  
> case for some of the currently available apps), it may be required to supply  
> multiple SDL Activity files, with classes inheriting from one super class  
> with shared code. For instance, we could have a class named SDLActivityCommon  
> and two subclasses SDLActivity10 and SDLActivity12. The default one should  
> probably be SDLActivity12, while SDLActivity10 can optionally be used for  
> existing apps. (I believe simple edits of the activity name in  
> AndroidManifest.xml and build.xml should do the job?) Of course, whenever  
> there is a good reason to support a newer API level as a target (for cases  
> like the one encountered with the joystick patch), a new activity subclass  
> can be added in a similar fashion.
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org) \<mailto:SDL at [lists.libsdl.org](http://lists.libsdl.org)\>  
> [http://lists.libsdl.org/\_\_listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/__listinfo.cgi/sdl-libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_ SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org) [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![NY00123](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/n/ea5d25/32.png) [@NY00123](https://discourse.libsdl.org/u/NY00123)\
**Post date:** [April 14, 2013, 3:46pm UTC](https://discourse.libsdl.org/t/minimal-supported-android-version/19488/15 "2013-04-14T15:46:08Z")

</div>

As far as I recall, originally I simply changed targetSdkVersion to "12"  
in AndroidManifest.xml. Later I learnt it’s a recommended practice to  
set the exact same target API level in project.properties (i.e.  
target=android-12). I did so manually (not via a command like “android  
update”) and haven’t yet encountered an issue. So far “ant clean” has  
helped a few times at least.

At this stage, I think it’s better to incorporate the Sensor API and its  
Android implementation first. It is related to joystick support in the  
following ways:

- There are already SDL 2.0 apps that read sensor input. To be more  
specific, they read accelerometer input using the joystick API.
- The proposed sensor API Android implementation has a hint that lets  
existing apps use an accelerometer in that way (i.e. as a joystick).
