Android浏览器的UA

1) 定义在WebSettings.java 中:

    // User agent strings.

    private static final String DESKTOP_USERAGENT =

            "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us)"

            + " AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0"

            + " Safari/530.17";

    private static final String IPHONE_USERAGENT = 

            "Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us)"

            + " AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0"

            + " Mobile/7A341 Safari/528.16";

 

2)Android代码 定义在字符串:

      com.android.internal.R.string.web_user_agent

你可能感兴趣的:(WebKit)