Android code for enable java script in WebView

Enable java in webview android code
android code for showing java script in webview


I have webview with id name webView1 i assigned webView1 to variable ourSite

WebView ourSite = (WebView) findViewById(R.id.webView1);


Now enable java script in webView1

WebSettings javasetting = ourSite.getSettings();
javasetting.setJavaScriptEnabled(true);


import header file for webview
import android.webkit.WebView;

import header file for websettings
import android.webkit.WebSettings;


For disable java script in webView1

WebSettings javasetting = ourSite.getSettings();
javasetting.setJavaScriptEnabled(false);

One Comment

  1. Woah! I'm really loving the template/theme of this site.
    It's simple, yet effective. A lot oof times it's challenging to get that "perfect balance" between usability and visual appearance.
    I must say that you've done a very good job with this.
    Additionally, the blog loads super fast for me onn Intyernet explorer.

    Exceptional Blog!

    Here is my web page mobile listbuilding

    ReplyDelete

Add your comments here

Back to Top