Re: [android-developers] code compatibility with different api levels

2012-06-18 Thread TreKing
On Thu, Jun 14, 2012 at 7:12 AM, Rishabh Jain wrote:

> What should I do so that my library can support both API levels at the
> same time. I am guessing there is some kind of annotation for that


Use reflection and the Android APIs which tell you which version you're
running on to selectively enable and disable features. There's a blog post
about it - search for it.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

[android-developers] code compatibility with different api levels

2012-06-17 Thread Rishabh Jain
Hi guys,
I am developing a library which third party applications will use in their
application to make their application accessible. Well the problem I am
facing is that I have implemented an interface(API level 10) in my library
but as of API level 11 some more functions were added to it, so now if
someone using API level 15 tries to use my library he/she will face an
error. Had I used the newer interface(API level 11), people
developing applications for API level 10 will face a problem. What should I
do so that my library can support both API levels at the same time. I am
guessing there is some kind of annotation for that

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en