On Friday, April 1, 2011 11:38:27 AM UTC-4, Benjamin Smedberg wrote: > Discussion followup to bug 625238 > <https://bugzilla.mozilla.org/show_bug.cgi?id=625238>.
Hi, After reading through this discussion thread as well as the comments on the bug report page, I think that there is one reason to expose the running Android version in the userAgent string that has not been discussed yet. Consider trying to make a website that closely replicates the look-and-feel of a native Android app. Correct me if I am wrong, but in order to do this reasonably well you need to know the running Android version in order to use an appropriate visual theme, and this cannot be accomplished with media queries or other standard APIs. Suppose further that you were going to develop the website using Google Web Toolkit (to take advantage of one of the mobile GWT app development frameworks). In GWT, the deferred binding mechanism is based on browser sniffing (usually using information extracted from the navigator.userAgent string, but other snippets of JavaScript can be used as well). You could define a custom compilation property for the Android version and then bind an appropriate CssResource, one for each theme, according to the detected Android version. I realize that selecting a theme based on the Android version alone is not perfect (after all, Android currently provides two system themes, Holo Light and Holo Dark), but at least it would be a start, and it should be possible to guess correctly for a majority of the users. Better yet, if the theme name were somehow included after the Android version, such as "Android 4.3 Holo Dark", then the website would not need to ask the user for the theme that he or she is using. In general, I feel that having to ask users for these pieces of information detracts greatly from the user experience. I for one would love to be able to do this, adapt the look-and-feel of a webpage to the native theme. However, if the user is using Firefox for Android, then I would have to guess a theme, and I would probably just pick the latest one. This would be problematic if Google decides to make a major redesign in the future. Would Mozilla consider adding information to the userAgent string to enable this automatic theme selection technique? _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform