Is it possible to check what is Android OS version on the device where the app is running?
I tried to check Phone library but all I found is SDK version that has nothing to do with OS version. The same app with targetSDK=29 can be installed on Android 4,7,9, 10 but I need to know what current OS version.
Sub Process_Globals
Private NativeMe As JavaObject
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
NativeMe.InitializeContext
End If
Dim s As String = NativeMe.RunMethod("getAndroidVersion", Null)
Log(s)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
#If JAVA
public String getAndroidVersion() {
String release = android.os.Build.VERSION.RELEASE;
int sdkVersion = android.os.Build.VERSION.SDK_INT;
return "Android SDK: " + sdkVersion + " (" + release +")";
}
#End If
The next versions of B4A (4.30) and B4J (2.80) will allow you to embed Java code inside your B4X code. B4i supports similar feature with Objective C. The purpose of this feature is to make it easier to access third party SDKs and also to allow developers to add existing Java code snippets to...
Sub Process_Globals
Private NativeMe As JavaObject
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
NativeMe.InitializeContext
End If
Dim s As String = NativeMe.RunMethod("getAndroidVersion", Null)
Log(s)
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
#If JAVA
public String getAndroidVersion() {
String release = android.os.Build.VERSION.RELEASE;
int sdkVersion = android.os.Build.VERSION.SDK_INT;
return "Android SDK: " + sdkVersion + " (" + release +")";
}
#End If
The next versions of B4A (4.30) and B4J (2.80) will allow you to embed Java code inside your B4X code. B4i supports similar feature with Objective C. The purpose of this feature is to make it easier to access third party SDKs and also to allow developers to add existing Java code snippets to...