private String getUserAgent() {
    if (Build.VERSION.SDK_INT < 19) {
      WebView webView = new WebView(this);
      WebSettings settings = webView.getSettings();
      return settings.getUserAgentString();
    }

    // api >= 19
    return WebSettings.getDefaultUserAgent(this);
  }
예제 #2
0
 static String a(Context context)
 {
     return WebSettings.getDefaultUserAgent(context);
 }