In my Java code, I can easily test the current API level at runtime with something like:
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
doSomething();
}
How can I find the equivalent of Build.VERSION.SDK_INT
in Delphi Rio?
I tried to look for int android_get_application_target_sdk_version()
but I cannot find a Delphi unit containing that.
On the other hand, I found a function AConfiguration_getSdkVersion(Config: PAConfiguration)
in the Androidapi.Configuration unit, but it needs a PAConfiguration
as parameter, and I don't know how to get one.