[android-beginners] Detecting version of Android at runtime

2010-07-16 Thread Bret Foreman
I'm about to implement a hack to work around a bug in Android 2.1. I'd
like that hack to be inactive in 2.2 where the bug is (reportedly)
fixed. How can I test at runtime for the version of Android that the
phone is running? In case anyone is interested, here's the hack:

https://sites.google.com/a/bug-br.org.br/android/technical-documents/sensors-and-standby-mode

Thanks

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Detecting version of Android at runtime

2010-07-16 Thread Justin Anderson
http://developer.android.com/reference/android/os/Build.VERSION.html

--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--


On Fri, Jul 16, 2010 at 2:36 PM, Bret Foreman bret.fore...@gmail.comwrote:

 I'm about to implement a hack to work around a bug in Android 2.1. I'd
 like that hack to be inactive in 2.2 where the bug is (reportedly)
 fixed. How can I test at runtime for the version of Android that the
 phone is running? In case anyone is interested, here's the hack:


 https://sites.google.com/a/bug-br.org.br/android/technical-documents/sensors-and-standby-mode

 Thanks

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en