Skip to content Skip to sidebar Skip to footer

Webview Not Being Seen As A Mobile Browser

In my webview I am going to http://www.nsopw.gov/Core/OffenderSearchCriteria.aspx when this is done via the android browser it is seen as a mobile site. But in my app in a webview

Solution 1:

try forcing the user agent string yourself, as it appears that the webview user agent string is not identifying itself as a mobile browser. use

webview.getSettings.setUserAgentString(...)

You can google for the useragent string, I used

Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

and it worked with the link you provided in your site and loaded the mobile version.

Post a Comment for "Webview Not Being Seen As A Mobile Browser"