Sometimes you need to pass another user-agent when opening a URL in the Webview, so here how to do it in Android app:
String userAgent = String.format( "%s %s/%s", this.webView.getSettings().getUserAgentString(), "Your Custom User-Agent", BuildConfig.VERSION_NAME ); this.webView.getSettings().setUserAgentString(userAgent); webView.loadUrl(url);
Top comments (0)