gpt4 book ai didi

java - 如何在android webview中阻止google adsense广告?

转载 作者:太空宇宙 更新时间:2023-11-04 11:08:40 27 4
gpt4 key购买 nike

如何在 Android webview 中屏蔽 google adsense 广告?我有一个启用了 adsense 的网站,我正在为该网站创建 android webview 应用程序。如何阻止该 webview 应用程序中的 adsense 广告?请帮忙。提前致谢!

最佳答案

按照以下步骤操作:将自定义用户代理设置为您的 WebView ,并根据 google.com.ua/... 在您的前端显示“显示广告”、“隐藏广告”选项或者在URL中传递mobile_app=1 当网站通过webview打开时,然后通过网站中的GET方法捕获mobile_app=1,在网站中编写代码: if($_GET['mobile_app'] != 1) {//Google 的广告}

关于java - 如何在android webview中阻止google adsense广告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46217626/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com