how to detect javascript features on Android 1.5
I开发者_C百科'm trying to write a code that can run on Android 1.5 and 2.0.1, but I have issues with the javascript engine used on Android 1.5.
alert(localStorage);
just hang on v1.5 while on v2.0.1 it alerts correctly.
is there an unblocking way to do it or to detect the version of Android with javascript?
I can get the Android version from navigator.userAgent
though
Why not do something like this,
if(window.localStorage) {
alert(localStorage);
}
I believe it is possible to overload the alert handler in a WebView. I would write my own based on an alert dialog and see if that works better than the default.
精彩评论