as I am using some CSS styles in a mobile web application which are not working or are not being rendered correctly in Android API versions smaller 8 (Froyo), I am now trying to get the API Level (must be > 7) or Android version number (> 2.1) through the user agent string (I prefer backend detection [JSP] over JavaScript, but this shouldn’t matter).
I’m currently checking if user agent (lower case) contains “iphone” OR (contains “android” AND “mobile” AND ??? <- version number)
Another possiblity would propably be to check against the WebKit build number.
Thank you for an answer.
Finding out the Android OS version number might suffice in most cases: you can use either of the following two approaches: