Is is possible to override Android WebView to use custom Accept-Language header?
Asked
Active
Viewed 6,698 times
1 Answers
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.
-
1[`Override`](http://www.tutorialspoint.com/java/java_overriding.htm) is the wrong keyword in this context. Instead you are adding additional headers. – Graeme Oct 17 '12 at 14:49
-
Thanks, replaced by overload :) – Jaffa Oct 18 '12 at 10:21
-
1Edited slightly to avoid confusing. – Graeme Oct 18 '12 at 13:43