Getting the Android OS version

DKCERT

Member
Licensed User
Longtime User
How do I get the Android OS version? In settings my test phone (HTC Desire) says:

- Android 2.2
- Software number: 2.29.405.5

How do I get this information?
 

DKCERT

Member
Licensed User
Longtime User
Hmm... I don't see how I get all this info?

B4X:
'[url=http://developer.android.com/sdk/android-2.2.html]Android 2.2 Platform | Android Developers[/url]
Dim p As phone
Dim OS As String

Select p.SdkVersion
   Case 2 : OS = "1.1"
   Case 3 : OS = "1.5"
   Case 4 : OS = "1.6"
   Case 5 : OS = "2.0"
   Case 6 : OS = "2.0.1"
   Case 7 : OS = "2.1"
   Case 8 : OS = "2.2"
   Case 9 : OS = "2.3"
   Case 10 : OS = "2.3.x" ' 2.3.3 or 2.3.4
   Case 11 : OS = "3.0"
   Case 12 : OS = "3.1"
   Case 13 : OS = "3.2"
   Case Else : OS = "?"
End Select

Return OS

Is this what you mean? Isn't there a 'smarter' way?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…