简体   繁体   中英

How to block google adsense ads in android webview?

How to block google adsense ads in android webview? I have an adsense enabled website and I am creating android webview app for that website. How to block adsense adss in that webview app? please help. Thanks in advance!

请遵循以下步骤:将自定义用户代理设置为Webview,并在google终端上基于google.com.ua/…或在URL中传递mobile_app = 1时显示“显示广告”,“隐藏广告”选项。 ,然后通过网站中的GET方法捕获mobile_app = 1,然后在网站中编写代码:if($ _ GET ['mobile_app']!= 1){// Google广告}

尝试使用回调shouldOverrideUrlLoading和shouldInterceptRequest拦截并阻止广告网址。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM