Reputation: 1081
I am creating a webview which loads some sites. I want to block popups appearing on the site, so that only legitimate Urls are seen by users. How can i achieve that ?? Browsers do detect popups and warns users about Blocking it or allowing it. So i assume that there must be a way to detect popups.
Thanks in advance.
Upvotes: 1
Views: 1057
Reputation: 141
You can try this:
webview.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
But at least for me not all popups are blocked and I can not explain why.
Upvotes: 1