On iOS, Adobe AIR’s Capabilities.os may be something like "iPhone OS 5.1.1 iPad3,1” – very clearly identifying the OS version as well as the device model. On Android, it looks more like “Linux 2.6.35.7-59465-g42bad32“. Wikipedia lists the following Linux kernels for android versions:
- 2.6.29: 1.6, 2.0, 2.1
- 2.6.32: 2.2x
- 2.6.35: 2.3x
- 2.6.36: 3.x
- 3.0.1: 4.0x
Are these set in stone or will some systems report different Linux versions?
Is there a better way to determine Android OS version using AIR and ActionScript?
For my purposes I need to differentiate 4.0 (Ice Cream Sandwich) from 4.1 (Jelly Bean). I think 4.1 uses Linux kernel 3.1.10 – can anyone confirm?
Well, I have another solution. I’ve found this AS3 class which determines Android’s version by grabbing an Android system file named “/system/build.prop”.
You can also get additional info such as Model, Brand, SDK Version and CPU
Take a look: https://github.com/funky-monkey/Android-Native-Device-Info
See also this for informations regarding iOS: