WebView의 기본 User-Agent 구하기


String userAgent = new WebView(context).getSettings().getUserAgentString();


WebView의 user-agent 변경하기


webview.getSettings().setUserAgentString("변경된 스트링");



URLConnection의 기본 User-Agent 구하기


String userAgent = System.getProperty("http.agent");


URLConnection의 user-agent 변경하기


HttpURLConnection conn = ...;

conn.setRequestProperty("User-Agent", "변경된 스트링"); 



* 참고

http://stackoverflow.com/questions/3626071/retrieve-user-agent-programatically

http://arabiannight.tistory.com/204

Posted by 에코지오
,