简体   繁体   中英

Android: Block Adsense ads in WebView

I have a site which features advertisements from "Adsance". I also have an app for Android contains a "webview". I want to hide advertisements "Adsance", if the user opens my website through my application. What I need to do to hide ads in my "webview"?

Pass mobile_app=1 in URL When website open through webview, Then catch mobile_app=1 through GET method in website. Write code in website:

if($_GET['mobile_app'] != 1)
{
 // Google ads 
}

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