We can get the platform name by using : System::get_property(‘platform’)
It returns string value and these value can be one of the following :
‘APPLE’ , ‘ANDROID’ , ‘Blackberry’ , ‘WP7’ , ‘WINDOWS’ and ‘UNKNOWN’ for others.
If we want to get the OS versions, we can do this using:
System::get_property('os_version')
This returns the os versions as like ‘6.0’ (Blackberry) , ‘5.0’ (iPhone) , ‘2.3.3’ (Android)…
If you just need to check particular version like 4 or 5 or its 6, something like this, then do such
System::get_property('os_version').split('.')[0].to_i
this will give you ‘4’ for os versions ‘4.3’.