So you have successfully created a webView in your App and already loaded your URL into it.
<pre class="lang:java decode:true "> WebView myWebView = (WebView) findViewById(R.id.webview); myWebView.setWebViewClient(new MyWebViewClient()); myWebView.loadUrl(url); However, any interaction with the page (such as a dropdown menu) will result in BadTokenException crash with the following error message;
FATAL EXCEPTION: main
android.view.WindowManager$BadTokenException: Unable to add window — token is not valid; is your activity running?
This happens when app wants to open a new dialog (e.