On Thu, Oct 21, 2010 at 7:48 AM, Doug Gordon <gordo...@gmail.com> wrote:
> Seems like this just gets the version that you compiled the app on.

No, it does not.

> I
> think the OP is looking for a runtime version for an app that can run
> on multiple versions.

Use android.os.Build.VERSION:

http://developer.android.com/reference/android/os/Build.VERSION.html

Here is a sample app demonstrating its use to determine which contacts
API to use at runtime:

http://github.com/commonsguy/cw-advandroid/tree/master/Contacts/Spinners/

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 
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

Reply via email to