Issue
this is my OnCreate
method .
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
this.requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_main);
wv = (WebView) findViewById(R.id.webview);
wv_setting = wv.getSettings();
wv_setting.setJavaScriptEnabled(true);
wv.loadUrl("file:///android_asset/home.html");
}
and this is my home.html
file .
<!DOCTYPE HTML>
<html>
<body>
<h1>Hello WebView !</h1>
</body>
<script type="text/javascript" src="app.js"></script>
</html>
this is my app.js
file .
alert('its working');
And i have home.html
and app.js
files in assets folder .
But its not working ( no alert message ).
Which part is wrong ?
Solution
alert is not supported by android WebView .
Answered By - amin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.