相关疑难解决方法(0)

Retrieve User-Agent programmatically

有没有办法在没有WebViewin活动的情况下检索浏览器的用户代理?

我知道有可能通过WebView以下方式获得:

WebView view = (WebView) findViewById(R.id.someview);
String ua = view.getSettings().getUserAgentString() ;
Run Code Online (Sandbox Code Playgroud)

但在我的情况下,我没有/需要一个webview对象,我不想只是为了检索用户代理字符串而创建它.

user-agent android webview android-webview

36
推荐指数
4
解决办法
3万
查看次数

标签 统计

android ×1

android-webview ×1

user-agent ×1

webview ×1