Can I show Web Page wtih Google Adsense in Chrome Custom Tabs?

Viewed 1135

I read in some websites like, showing webpage which contains google adsense in Android webview is against their policy.

I would like to know, whether we can show the web page with google adsense in chrome custom tabs?

I have a news website and android app. I am showing short news in app and while clicking on the more button in app, it will open the web page in browser. I am not opening the web page in webview, as my web page contains google ads. Could anyone please suggest, whether I can open the webpage inside my app using chrome custom tabs functionality? Please share your idea and experience.

3 Answers

According to this support link, you can show Adsense on Chrome Custom Tabs.

Format requirements

- WebView

AdSense for content (AFC) and Ad Exchange (AdX) display ads are not supported through all WebView technologies. App developers wishing to monetize by publishing AFC and AdX display ads through a WebView must use one of the following supported viewing frames:
- Android: Chrome Custom Tab
- iOS: SFSafariViewController (iOS9 and iOS10 only)

yes, you can use chrome custom tabs functionality

Use this code below :

dependencies {      
    compile 'com.android.support:customtabs:23.4.0'
}

Open a Chrome custom tab :

Uri uri = Uri.parse("https://segunfamisa.com");

// create an intent builder
CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder();

// Begin customizing
// set toolbar colors
intentBuilder.setToolbarColor(ContextCompat.getColor(this, R.color.colorPrimary));
intentBuilder.setSecondaryToolbarColor(ContextCompat.getColor(this, R.color.colorPrimaryDark));

// set start and exit animations
intentBuilder.setStartAnimations(this, R.anim.slide_in_right, R.anim.slide_out_left);
intentBuilder.setExitAnimations(this, android.R.anim.slide_in_left,
        android.R.anim.slide_out_right);

// build custom tabs intent
CustomTabsIntent customTabsIntent = intentBuilder.build();

// launch the url
customTabsIntent.launchUrl(activity, uri);

As you are worried about Ad placement policies.

Ads in a software application

Publishers are not permitted to distribute Google ads or AdSense for search boxes through software applications including, but not limited to toolbars, browser extensions, and desktop applications. AdSense code may only be implemented on web-based pages and approved WebView technologies.

Here is reply from Ads Support team for your concern.

If you, yourself choose to open an ad in a new tab when you click it yourself (on someone else's site), then that's a viewer choice and nobody can stop you.

If you mean you want to set the ads on your own website to open in a new tab, then no, you cannot do that as it would violate ad placement policies.

Hope it's clear now.

Related