LoginSignup
3
4

More than 5 years have passed since last update.

Android UserAgentの設定方法

Posted at

UserAgentの設定方法

ユーザーエージェント(UA)の設定方法は、
既存のユーザーエージェントに上書きして設定するみたいです。
基本的には
カスタムUA = 既存のUA + 定義したい文字列
でOKです。

WebView webView = new WebView(getApplicationContext());
webView.getSettings().setUserAgent(webView.getSettings().getUserAgent() + "定義したい文字列");

3
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
4