It seems that there is no limit or it is very large. I did some tests with simple code
webView.loadUrl(
"javascript:function a(s){alert(s.length + ' ' + s.substring(s.length-5))}");
String repeated =
String.format(String.format("%%0%dd", 80000), 0).replace("0", ".") + "xx";
webView.loadUrl("javascript:a('"+repeated+"')");
The first line: the definition of the function, the second line - the preparation of a long line, the third - a call function with a very long string argument.
It works great. As a result, I see a warning to JS: "80002 ... xx"
source
share