public Sub GetVersionAndroid() As String
If V_VersionAndroid = "" Then
'Dim P As Phone
V_VersionAndroid = GetSDKversion(False) ' P.SdkVersion
End If
Return V_VersionAndroid
End Sub
Sub GetSDKversion(SoloDevolverVersionComercial As Boolean) As String
'https://developer.android.com/studio/releases/platforms
Dim versions As Map
versions.Initialize
versions.Put(3,"1.5")
versions.Put(4,"1.6")
versions.Put(7,"2.1")
versions.Put(8,"2.2")
versions.Put(10,"2.3.3")
versions.Put(11,"3.0")
versions.Put(12,"3.1")
versions.Put(13,"3.2")
versions.Put(14,"4.0")
versions.Put(15,"4.0.3")
versions.Put(16,"4.1.2")
versions.Put(17,"4.2.2")
versions.Put(18,"4.3")
versions.Put(19,"4.4.2")
versions.Put(20,"4.4W") '5.0p
versions.Put(21,"5.0")
versions.Put(22,"5.1")
versions.Put(23,"6.0")
versions.Put(24,"7.0")
versions.Put(25,"7.1")
versions.Put(26,"8.0")
versions.Put(27,"8.1")
versions.Put(28,"9.0")
versions.Put(29,"10.0")
versions.Put(30,"11.0")
versions.Put(31,"31.0")
versions.Put(32,"32.0")
versions.Put(33,"33.0")
versions.Put(34,"34.0")
versions.Put(35,"35.0")
versions.Put(36,"36.0")
versions.Put(37,"37.0")
versions.Put(38,"38.0")
versions.Put(39,"39.0")
Dim p As Phone
Dim Rt As String
Rt = p.SdkVersion
Try
If SoloDevolverVersionComercial Then
Rt = versions.Get(p.SdkVersion)
Else
Rt = Rt & ": " & versions.Get(p.SdkVersion) & " " & p.Product
End If
Catch
If SoloDevolverVersionComercial Then
Rt = p.SdkVersion + "?"
Else
Rt = Rt & ": No en GetSDKversion"
End If
Log(LastException)
End Try
Return Rt
End Sub
Sub GetApiVesionSKD As String 'ignore
Dim r As Reflector
Dim Api As Int
Api = r.GetStaticField("android.os.Build$VERSION", "SDK_INT")
Return Api
End Sub