There's also a great article on the developer blog about using newer
API with an old target: 
http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html

I'm extensively using 1.5 features in my app while still maintaing
compatibility with 1.1. The key is to set the target to 2 and wrap
every single 1.5 API call through reflection in a wrapper class (see
the blog). Using 1.5 XML tags, like Dianne said, is no problem at all
and will be ignored on 1.1.

Be sure to test on 1.1!! Your app can break in many ways because of
something you thought would be fine on 1.1 but isn't.

-Mike


On Oct 7, 10:33 am, Dianne Hackborn <[email protected]> wrote:
> If you set it to 3 it won't be installed on older devices.  I don't know
> enough about the dev tools to help with compiling problems there (especially
> without even seeing the error message).
>
>
>
> On Wed, Oct 7, 2009 at 10:18 AM, gnugu <[email protected]> wrote:
>
> > Just to make sure I understand you correctly, I set the API level in
> > my app to 3 and when someone runs it on Android 1.1 the attributes
> > will be ignored?
>
> > Because when I keep the API level at 2 the project will not compile
> > (at least in Eclipse).
>
> > On Oct 7, 10:13 am, Dianne Hackborn <[email protected]> wrote:
> > > You can use any newer XML attributes, and they will be ignored on older
> > > platforms.  So just specify the appropriate attributes for the IME for
> > the
> > > newer platforms.  (And also be sure to still test on older platforms, if
> > you
> > > really care about that.  I don't think there are a ton of devices left at
> > > API 2, though I really don't know any numbers, so it may not be that
> > > important.)
>
> > > On Wed, Oct 7, 2009 at 9:51 AM, gnugu <[email protected]> wrote:
>
> > > > Hi,
> > > > Google suggests in Dev Guide that we set the API level as low as
> > > > possible to cover most of the devices.
>
> > > > Somebody recently pointed out in my app that when they are typing in
> > > > the password the automatic suggestions pop up making it annoying.
>
> > > > I found out the solution, but is only available in API level 3.
>
> > > > I guess my question is, are there devices out there that use Android
> > > > 1.1 still?
>
> > > > Does Google have any stats on this?
>
> > > > Thanks.
>
> > > --
> > > Dianne Hackborn
> > > Android framework engineer
> > > [email protected]
>
> > > Note: please don't send private questions to me, as I don't have time to
> > > provide private support, and so won't reply to such e-mails.  All such
> > > questions should be posted on public forums, where I and others can see
> > and
> > > answer them.
>
> --
> Dianne Hackborn
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to