4

Is is possible to override Android WebView to use custom Accept-Language header?

jtam
  • 61
  • 1
  • 5

1 Answers1

10

The current implementation of WebView already allows you to add headers using the following syntax:

Map<String, String> headers = new HashMap<String, String>();
headers.put("Accept-Language", "fr_fr");
mWebView.loadUrl("http://developer.android.com", headers);

See WebView.loadUrl() for more information.

Graeme
  • 25,714
  • 24
  • 124
  • 186
Jaffa
  • 12,442
  • 4
  • 49
  • 101