Pdee As-Diddy
Pdee As-Diddy

Reputation: 157

How to prevent mobile view from loading in webview

Am designing an android app with webview but always when the mobile view of the website loads but i want to load the desktop version instead

Upvotes: 2

Views: 1103

Answers (1)

nikis
nikis

Reputation: 11244

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

Upvotes: 1

Related Questions