我正在设计一个带有webview的android应用程序,但总是在网站的移动视图加载时却总是要加载桌面版本
You can try the following:
WebView.getSettings()
.setUserAgentString("Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0")
UserAgent strings for setUserAgentString
method can be found here http://www.useragentstring.com/pages/useragentstring.php
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.