I struggled with how to name this one, but basically I have a WebView
that allows users to statically specify a URL and then display the page in side our app in a WebView
. All fine and dandy - it works. However one user has specified www.streamable.com
which allows a user to upload a video, and then provides a URL to that video.
The WebView
loads the www.streamable.com
site just fine, but does not seem to do anything when they hit the "Upload a video file" button. In a normal browser the following is displayed (even on a mobile device):
and the normal popup (after you choose which mechanism):
I visited the following StackOverflow
examples, but they haven't worked:
WebView blocking pop up windows?
How to display javascript popup in android webview
How to work with pop ups window in android webview
Is this some Javascript restriction (tried those options), or a known security restriction that the WebView
enforces that I haven't stumbled across?
Here is the code that I am using:
mWebView.setWebChromeClient(new WebChromeClient() {
});
mWebView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading (WebView view, String url) {
view.loadUrl(url);
return true;
}
});
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setAppCacheEnabled(true);
mWebView.loadUrl("www.streamable.com");
Thanks in advance for your help.