Currently, you can only fetch the OS version as a string via the Ti.Platform.version property. This is not convenient to use when you only want to call APIs on higher OS versions. For example, we've seen a lot of code that looks like the below.
Add the following properties to Ti.Platform...
- Ti.Platform.versionMajor // Returns an integer.
- Ti.Platform.versionMinor // Returns an integer.
This will make the above code example look simpler like this...
On Android, we have a Ti.Platform.Android.API_LEVEL constant which is a single integer used to represent all Android OS versions. It's best to use this if you can, but note that no other platform has a similar concept... while all operating system support a <major>.<minor> version that we can use for parity.