• Thursday, February 11, 2016

    Android - How to show javascript alert in WebView

    Syed Masoom Rizvi

    How to show javascript alert in WebView?

    In android, WebView does not show javascript alert dialog in activity. Here I give a solution that can easily handle the alert dialog with user customization. 

    Write the following code under activity after initiating the WebView.


    WebView wv= (WebView) findViewById(R.id.webView);
    final Context mc=this;