Get Android Version

tdocs2

Well-Known Member
Licensed User
Longtime User
Greetings everyone and thank you in advance for answering my question.

Is there a way to get the version of Android running on a device?

I had been testing with 4.0 and above, but I decided to widen the scope of platforms. I bought a phone with Android 2.3. I have found that some views s.a, spinners, buttons, etc. behave differently specially in colors and textcolor. For example, a spinner color black and textcolor white will not work in 2.3 while it works great on 4.0 and above.

Is there an impact on the minSDK and targetSDK in the manifest file?

As usual any and all help will be appreciated.

Thank you.
 

tdocs2

Well-Known Member
Licensed User
Longtime User
Thanks NJ

Thanks, NJ.

By getting the SdkVersion and coupling it with the data in the Android SDK Manager, an app could derive the Android version. For example, version 10 is Android 2.3.3 while 17 is 4.2.2.

However, for building device specific routines, the SdkVersion and the size of the device should suffice.

Thanks for pointing me in the right direction. Hope this helps someone else.
 
Upvote 0
Top