Alex Rivera | Logout

How can I check in code the Android version like 1.5 or 1.6

Asked 2010-06-10T12:01:47.783
15

I need to check in code what Android release version is running currently on target device. Can you supply code example?

Edit
Report

2 Answers

25

I was looking for this and didn't find a solution - ended up here and I figured it out myself so for anyone out there looking for this:

int SDK_INT = android.os.Build.VERSION.SDK_INT;

this returns os sdk level 7 eclair 8 froyo etc

answered 2010-11-18T17:34:43.243
1

I think this is a duplicate of my own question: ndk version at run time. Short answer: no easy way for a native application to do it (you could however run a Java app and communicate with it to get the version).

answered 2010-06-20T13:03:52.350

Your Answer