I'm currently building an Android App that uses a Webview to show a HTML site that has a javascript script in it. I use the following code:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.e(TAG, "-----> Starting HowItWorksActivity");
setContentView(R.layout.activity_how_it_works);
WebView howItWorksView = (WebView) findViewById(R.id.howItWorksView);
WebSettings settings = howItWorksView.getSettings();
settings.setDefaultTextEncodingName("utf-8");
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true);
howItWorksView.loadUrl("http://some_url/faq_de.html");
}
Where the html page looks like the following:
<html lang="de">
<head>
</head>
(...)
<h1>Some Text </h1>
<script src="getmoretext.js" type="text/javascript"></script>
(...)
</body>
In the Browser, this works perfectly fine, however the webview doesn't show the part that is created by the getmoretext script....
I have JavaScript and DomStorage enabled in the webview.
Any ideas?
type="text/javascript".