android 获取浏览器 User Agent 的代码
//获取浏览器User Agent的代码: WebView webview; webview = new WebView(this); webview.layout(0, 0, 0, 0); WebSettings settings = webview.getSettings(); userAgent0 = settings.getUserAgentString(); Log.e("HJJ", "User Agent:" + userAgent0);