我可以在 Chrome 自定义标签中显示带有 Google Adsense 的网页吗?

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

我在一些网站上看到,在 Android webview 中显示包含 google adsense 的网页违反了他们的政策。

我想知道,是否可以在 chrome 个自定义标签中显示带有 google adsense 的网页?

我有一个新闻网站和 android 应用程序。我在应用程序中显示短消息,同时单击应用程序中的更多按钮,它将在浏览器中打开网页。我没有在 webview 中打开网页,因为我的网页包含 google 广告。谁能建议我是否可以使用 chrome 自定义标签功能在我的应用程序中打开网页?请分享您的想法和经验。

是的,您可以使用 chrome 自定义标签功能

使用下面的代码:

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

打开一个 Chrome 自定义选项卡 :

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);

因为您担心广告投放政策。

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 是广告支持团队对您问题的回复。

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.

希望现在已经清楚了。

根据此 support link,您可以在 Chrome 自定义标签上显示 Adsense。

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)