I did quite extensive research on Android WebView dekstop site requesting (forcing) but none of the paths lead to the desired end. I tried setting up User Agent of WebView to:
String userAgent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/20100101 Firefox/4.0";
webView.getSettings().setUserAgentString(userAgent);
as in Force webview to display desktop sites but it did not load the full desktop site. I also tried more of the UA strings to be sure its not just an invalid one. I even tried implementing the desktop size forcing from https://github.com/delight-im/Android-AdvancedWebView/blob/6db5a76b781c636513282b9efed993e705db4570/Source/library/src/main/java/im/delight/android/webview/AdvancedWebView.java#L358
I also tried to force the WebView to use wide view port (which as I understand should also use desktop size (or any html meta tag size)):
webView.getSettings().setUseWideViewPort(true);
webView.getSettings().setLoadWithOverviewMode(true);
All aforementioned solutions do not work for my target sites: imobiliar.cz, dpmb.cz or even google.com (not sure there, because it looks almost the same way as on desktop, with very minor differences).
I can see that most probably the issue lies somewhere in the sites itself (probably javascript?) which checks the screen resolution and setting up the view accordingly - in landscape mode, it is desktop size on some devices.
When I try those sites in Google Chrome app, they are working as expected - mobile version in default and desktop version while Desktop version checked in menu. My question is very simple - how does the Request Desktop Site in google chrome or other mobile browsers work? Or even better - how can I do the same for my app?