0

I am developing an application for my website, since it is responsive with mobile and tablet, I am doing it with only very simple webrowser. Only my site has Pop-up, when a user clicks on it anywhere in the site opens a new tab with advertisement.

The problem is that in the app, there is no way for the user to close that ad page and return to the normal site. It would have to close and open the app again .. How do I block these ads in my app, or have it run "in the background".

maicao
  • 1

2 Answers2

0

you can block those particular ads by comparing window size in javascript. You can detect the screen size in Vanilla JS or jQuery. In jQuery you can use height() and width() to get screen size. So you can try this

jQuery(document).ready(function(){
  if($(window).width() > 480){
    // Your code of remove Ads
  }
});
  • It's not a small window. It's a new guide. Can not I just let you browse my site. Example, that the person can only navigate in my domain, which for example would be www.flame007.com And if you open a new ad guide, it automatically closes. – maicao Jun 13 '18 at 07:06
0

You Can go to your webview setting and add this code after :

WebSettings webSettings = myWebView.getSettings();
webSettings.setSupportMultipleWindows(true);
Joseph Budin
  • 1,299
  • 1
  • 11
  • 28