将 Pangle 与出价功能集成

This guide shows you how to use the Google Mobile Ads SDK to load and display ads from Pangle using mediation, covering both waterfall and bidding integrations. It covers how to add Pangle to an ad unit's mediation configuration, and how to integrate the Pangle SDK and adapter into an Android app.

Supported integrations and ad formats

The mediation adapter for Pangle has the following capabilities:

Integration
Bidding
Waterfall  1
Formats
App open  2
Banner
Interstitial
Rewarded
Rewarded Interstitial
Native
1 Waterfall integration is in closed beta.

2 Bidding integration for this format is in closed beta.

Requirements

  • Android API level 21 or higher

Step 1: Set up configurations in Pangle UI

注册登录您的 Pangle 帐号。

添加新应用

转到 Applications(应用)标签页,然后点击 Add App(添加应用)按钮。

选择要为其创建应用的操作系统,并填写表单的其余部分。然后点击提交

记下您应用的应用 ID

创建广告展示位置

创建应用后,点击添加按钮创建广告展示位置。

出价

选择广告格式广告展示位置名称,然后选择应用内出价作为定价类型。填写表单的其余部分,然后点击提交

创建广告展示位置后,请记下广告展示位置 ID

瀑布

选择广告格式广告展示位置名称,然后选择全局每千次展示费用作为定价类型。填写表单的其余部分,然后点击提交

创建广告展示位置后,请记下广告展示位置 ID

开启测试模式

请按照 Pangle 的如何添加测试广告指南中的说明启用 Pangle 测试广告。

Step 2: Set up Pangle demand in Ad Manager UI

登录您的 Ad Manager 帐号

添加 Pangle 公司

出价

出价集成不需要执行此步骤。

瀑布

依次前往管理 > 公司,然后点击所有公司标签页中的新公司按钮。选择广告联盟

选择 Pangle 作为广告联盟,输入一个唯一的名称并启用中介

您无需输入用户名密码。完成后,点击保存

启用安全信号共享

出价

依次前往管理 > 全局设置。前往 Ad Exchange 帐号设置标签页,然后查看并开启安全信号共享。点击保存

瀑布

广告瀑布流集成不需要执行此步骤。

配置 Pangle 出价

出价

依次前往投放 > 出价方,然后点击 SDK 出价标签页下的新出价方

选择Pangle作为出价方。

开启将此出价方的信号库添加到允许的信号列表中允许与此出价方共享信号。然后,点击继续

点击继续

点击完成

瀑布

广告瀑布流集成不需要执行此步骤。

配置广告单元映射

出价

依次前往投放 > 出价方,然后在 SDK 出价标签页下,为Pangle 选择公司。

转到广告单元映射标签页,然后点击新建广告单元映射

选择特定广告单元。选择一种广告单元和格式,选择移动应用作为广告资源类型,然后选择移动应用。然后,输入在上一部分中获得的App ID and Ad Placement ID 。最后,点击保存

瀑布

依次转到投放 > 收益组,然后点击新建收益组按钮。选择您的移动应用

向下滚动,然后点击添加收益合作伙伴

选择您在上一部分中为 Pangle创建的公司。选择移动 SDK 中介作为集成类型,选择 Android 作为平台,选择活跃作为状态

输入在上一部分获得的 App ID and Ad Placement ID,以及默认 CPM 值。点击保存

Step 3: Import the Pangle SDK and adapter

In your project-level settings.gradle.kts file, add the following repositories:

dependencyResolutionManagement {
  repositories {
    google()
    mavenCentral()
    maven {
      url = uri("https://artifact.bytedance.com/repository/pangle/")
    }
  }
}

Then, in your app-level build.gradle.kts file, add the following implementation dependencies and configurations. Use the latest versions of the Pangle SDK and adapter:

dependencies {
    implementation("com.google.android.gms:play-services-ads:23.2.0")
    implementation("com.google.ads.mediation:pangle:6.0.0.8.0")
}

Manual integration

  1. Download the latest version of the Pangle SDK for Android and extract the open_ad_sdk.aar under from the downloaded archive folder and add it to your project.

  2. Navigate to the Pangle adapter artifacts on Google's Maven Repository. Select the latest version, download the Pangle adapter's .aar file, and add it to your project.

Step 4: Add required code

ProGuard obfuscation

If you use ProGuard to obfuscate Android code, follow the instructions in Pangle's documentation to ensure Pangle SDK code isn't obfuscated.

Step 5: Test your implementation

启用测试广告

请务必为Ad Manager 注册您的测试设备,并在 Pangle 界面中启用测试模式

验证测试广告

如需验证您收到的是来自Pangle的测试广告,请使用相应广告来源在广告检查器中启用单一广告来源测试Pangle (Bidding) and Pangle (Waterfall)

Optional Steps

Native ads

Ad rendering

The Pangle adapter returns its native ads as NativeAd objects. It populates the following fields for a NativeAd.

Field Assets always included by Pangle adapter
Headline
Image 1
Body
Icon
Call to action
Star rating
Store
Price
Advertiser

1 The Pangle adapter does not provide direct access to the main image asset for its native ads. Instead, the adapter populates the MediaView with a video or an image.

Error codes

If the adapter fails to receive an ad from Pangle, you can check the underlying error from the ad response using ResponseInfo.getAdapterResponses() under the following classes:

com.pangle.ads
com.google.ads.mediation.pangle.PangleMediationAdapter

Here are the codes and accompanying messages thrown by the Pangle adapter when an ad fails to load:

Error code Domain Reason
101 com.google.ads.mediation.pangle Invalid server parameters (e.g. Missing app ID or placement ID).
102 com.google.ads.mediation.pangle The requested ad size does not match a Pangle supported banner size.
103 com.google.ads.mediation.pangle Missing or invalid bid response.
-1-60000 com.pangle.ads Pangle SDK returned an error. See Pangle's documentation for more details.

Pangle Android Mediation Adapter Changelog

Version 6.0.0.8.0

  • Verified compatibility with Pangle SDK version 6.0.0.8.

Built and tested with:

  • Google Mobile Ads SDK version 23.1.0.
  • Pangle SDK version 6.0.0.8.

Version 6.0.0.7.0

  • Verified compatibility with Pangle SDK version 6.0.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 23.1.0.
  • Pangle SDK version 6.0.0.7.

Version 6.0.0.5.0

  • Verified compatibility with Pangle SDK version 6.0.0.5.

Built and tested with:

  • Google Mobile Ads SDK version 23.1.0.
  • Pangle SDK version 6.0.0.5.

Version 6.0.0.4.0

  • Verified compatibility with Pangle SDK version 6.0.0.4.

Built and tested with:

  • Google Mobile Ads SDK version 23.1.0.
  • Pangle SDK version 6.0.0.4.

Version 6.0.0.3.0

  • Verified compatibility with Pangle SDK version 6.0.0.3.

Built and tested with:

  • Google Mobile Ads SDK version 23.1.0.
  • Pangle SDK version 6.0.0.3.

Version 5.9.0.6.0

  • Verified compatibility with Pangle SDK version 5.9.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 23.1.0.
  • Pangle SDK version 5.9.0.6.

Version 5.9.0.5.0

  • Verified compatibility with Pangle SDK version 5.9.0.5.

Built and tested with:

  • Google Mobile Ads SDK version 23.1.0.
  • Pangle SDK version 5.9.0.5.

Version 5.9.0.4.0

  • Verified compatibility with Pangle SDK version 5.9.0.4.

Built and tested with:

  • Google Mobile Ads SDK version 23.0.0.
  • Pangle SDK version 5.9.0.4.

Version 5.9.0.2.0

  • Verified compatibility with Pangle SDK version 5.9.0.2.

Built and tested with:

  • Google Mobile Ads SDK version 23.0.0.
  • Pangle SDK version 5.9.0.2.

Version 5.8.1.0.0

  • Verified compatibility with Pangle SDK version 5.8.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 23.0.0.
  • Pangle SDK version 5.8.1.0.

Version 5.8.0.9.0

  • Verified compatibility with Pangle SDK version 5.8.0.9.
  • Updated the minimum required Google Mobile Ads SDK version to 23.0.0.

Built and tested with:

  • Google Mobile Ads SDK version 23.0.0.
  • Pangle SDK version 5.8.0.9.

Version 5.8.0.7.0

  • Verified compatibility with Pangle SDK version 5.8.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 22.6.0.
  • Pangle SDK version 5.8.0.7.

Version 5.8.0.6.0

  • Verified compatibility with Pangle SDK version 5.8.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 22.6.0.
  • Pangle SDK version 5.8.0.6.

Version 5.7.0.3.0

  • Verified compatibility with Pangle SDK version 5.7.0.3.

Built and tested with:

  • Google Mobile Ads SDK version 22.6.0.
  • Pangle SDK version 5.7.0.3.

Version 5.7.0.2.0

  • Verified compatibility with Pangle SDK version 5.7.0.2.

Built and tested with:

  • Google Mobile Ads SDK version 22.6.0.
  • Pangle SDK version 5.7.0.2.

Version 5.7.0.1.0

  • Verified compatibility with Pangle SDK version 5.7.0.1.

Built and tested with:

  • Google Mobile Ads SDK version 22.6.0.
  • Pangle SDK version 5.7.0.1.

Version 5.6.0.3.0

  • Verified compatibility with Pangle SDK version 5.6.0.3.
  • Updated the minimum required Google Mobile Ads SDK version to 22.6.0.

Built and tested with:

  • Google Mobile Ads SDK version 22.6.0.
  • Pangle SDK version 5.6.0.3.

Version 5.5.0.9.0

  • Updated the minimum required Google Mobile Ads SDK version to 22.5.0.
  • Verified compatibility with Pangle SDK version 5.5.0.9.

Built and tested with:

  • Google Mobile Ads SDK version 22.5.0.
  • Pangle SDK version 5.5.0.9.

Version 5.5.0.8.0

  • Verified compatibility with Pangle SDK version 5.5.0.8.

Built and tested with:

  • Google Mobile Ads SDK version 22.3.0.
  • Pangle SDK version 5.5.0.8.

Version 5.5.0.7.0

  • Verified compatibility with Pangle SDK version 5.5.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 22.3.0.
  • Pangle SDK version 5.5.0.7.

Version 5.5.0.6.0

  • Bidding app open ad format isn't supported in this version as this adapter version was reverted to depend on Google Mobile Ads SDK version 22.3.0.
  • Verified compatibility with Pangle SDK version 5.5.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 22.3.0.
  • Pangle SDK version 5.5.0.6.

Version 5.5.0.4.0

  • Added bidding support for app open ad format.
  • Added watermark support for bidding ads.
  • Updated the minimum required Google Mobile Ads SDK version to 22.4.0.
  • Verified compatibility with Pangle SDK version 5.5.0.4.

Built and tested with:

  • Google Mobile Ads SDK version 22.4.0.
  • Pangle SDK version 5.5.0.4.

Version 5.4.1.1.0

  • Fixed an issue where the adapter fails to initialize.
  • Verified compatibility with Pangle SDK version 5.4.1.1.

Built and tested with:

  • Google Mobile Ads SDK version 22.3.0.
  • Pangle SDK version 5.4.1.1.

Version 5.4.0.9.0

  • Verified compatibility with Pangle SDK version 5.4.0.9.
  • Updated the minimum required Google Mobile Ads SDK version to 22.3.0.

Built and tested with:

  • Google Mobile Ads SDK version 22.3.0.
  • Pangle SDK version 5.4.0.9.

Version 5.4.0.8.0

  • Verified compatibility with Pangle SDK version 5.4.0.8.

Built and tested with:

  • Google Mobile Ads SDK version 22.2.0.
  • Pangle SDK version 5.4.0.8.

Version 5.3.0.6.0

  • Verified compatibility with Pangle SDK version 5.3.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 22.2.0.
  • Pangle SDK version 5.3.0.6.

Version 5.3.0.5.0

  • Verified compatibility with Pangle SDK version 5.3.0.5.

Built and tested with:

  • Google Mobile Ads SDK version 22.2.0.
  • Pangle SDK version 5.3.0.5.

Version 5.3.0.4.0

  • Verified compatibility with Pangle SDK version 5.3.0.4.

Built and tested with:

  • Google Mobile Ads SDK version 22.2.0.
  • Pangle SDK version 5.3.0.4.

Version 5.2.0.7.0

  • Verified compatibility with Pangle SDK version 5.2.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 22.1.0.
  • Pangle SDK version 5.2.0.7.

Version 5.2.0.6.0

  • Verified compatibility with Pangle SDK version 5.2.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 22.1.0.
  • Pangle SDK version 5.2.0.6.

Version 5.2.0.5.0

  • Verified compatibility with Pangle SDK version 5.2.0.5.

Built and tested with:

  • Google Mobile Ads SDK version 22.1.0.
  • Pangle SDK version 5.2.0.5.

Version 5.2.0.3.0

  • Added waterfall support for app open, banner (includes MREC), interstitial, rewarded and native ad formats.
  • Verified compatibility with Pangle SDK version 5.2.0.3.

Built and tested with:

  • Google Mobile Ads SDK version 22.0.0.
  • Pangle SDK version 5.2.0.3.

Version 5.1.0.9.0

  • Verified compatibility with Pangle SDK version 5.1.0.9.

Built and tested with:

  • Google Mobile Ads SDK version 22.0.0.
  • Pangle SDK version 5.1.0.9.

Version 5.1.0.8.0

  • Verified compatibility with Pangle SDK version 5.1.0.8.

Built and tested with:

  • Google Mobile Ads SDK version 22.0.0.
  • Pangle SDK version 5.1.0.8.

Version 5.1.0.6.0

  • Updated adapter to use new VersionInfo class.
  • Updated the minimum required Google Mobile Ads SDK version to 22.0.0.

Built and tested with:

  • Google Mobile Ads SDK version 22.0.0.
  • Pangle SDK version 5.1.0.6.

Version 5.0.1.1.0

  • Verified compatibility with Pangle SDK version 5.0.1.1.

Built and tested with:

  • Google Mobile Ads SDK version 21.5.0.
  • Pangle SDK version 5.0.1.1.

Version 5.0.1.0.0

  • Verified compatibility with Pangle SDK version 5.0.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 21.5.0.
  • Pangle SDK version 5.0.1.0.

Version 5.0.0.9.0

  • Verified compatibility with Pangle SDK version 5.0.0.9.

Built and tested with:

  • Google Mobile Ads SDK version 21.5.0.
  • Pangle SDK version 5.0.0.9.

Version 5.0.0.8.0

  • Verified compatibility with Pangle SDK version 5.0.0.8.

Built and tested with:

  • Google Mobile Ads SDK version 21.5.0.
  • Pangle SDK version 5.0.0.8.

Version 5.0.0.7.0

  • Verified compatibility with Pangle SDK version 5.0.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 21.5.0.
  • Pangle SDK version 5.0.0.7.

Version 5.0.0.6.0

  • Verified compatibility with Pangle SDK version 5.0.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 21.5.0.
  • Pangle SDK version 5.0.0.6.

Version 4.9.0.9.0

  • Verified compatibility with Pangle SDK version 4.9.0.9.
  • Updated the minimum required Google Mobile Ads SDK version to 21.5.0.

Built and tested with:

  • Google Mobile Ads SDK version 21.5.0.
  • Pangle SDK version 4.9.0.9.

Version 4.9.0.8.0

  • Verified compatibility with Pangle SDK version 4.9.0.8.

Built and tested with:

  • Google Mobile Ads SDK version 21.4.0.
  • Pangle SDK version 4.9.0.8.

Version 4.9.0.7.0

  • Verified compatibility with Pangle SDK version 4.9.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 21.4.0.
  • Pangle SDK version 4.9.0.7.

Version 4.9.0.6.0

  • Verified compatibility with Pangle SDK version 4.9.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 21.4.0.
  • Pangle SDK version 4.9.0.6.

Version 4.8.1.0.0

  • Verified compatibility with Pangle SDK version 4.8.1.0.
  • Updated the minimum required Google Mobile Ads SDK version to 21.4.0.

Built and tested with:

  • Google Mobile Ads SDK version 21.4.0.
  • Pangle SDK version 4.8.1.0.

Version 4.8.0.9.0

  • Verified compatibility with Pangle SDK version 4.8.0.9.

Built and tested with:

  • Google Mobile Ads SDK version 21.3.0.
  • Pangle SDK version 4.8.0.9.

Version 4.8.0.8.0

  • Verified compatibility with Pangle SDK version 4.8.0.8.

Built and tested with:

  • Google Mobile Ads SDK version 21.3.0.
  • Pangle SDK version 4.8.0.8.

Version 4.8.0.7.0

  • Verified compatibility with Pangle SDK version 4.8.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 21.3.0.
  • Pangle SDK version 4.8.0.7.

Version 4.8.0.6.0

  • Verified compatibility with Pangle SDK version 4.8.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 21.3.0.
  • Pangle SDK version 4.8.0.6.

Version 4.7.0.7.0

  • Verified compatibility with Pangle SDK version 4.7.0.7.
  • Updated the minimum required Google Mobile Ads SDK version to 21.3.0.

Built and tested with:

  • Google Mobile Ads SDK version 21.3.0.
  • Pangle SDK version 4.7.0.7.

Version 4.7.0.6.0

  • Verified compatibility with Pangle SDK version 4.7.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 21.2.0.
  • Pangle SDK version 4.7.0.6.

Version 4.7.0.5.0

  • Verified compatibility with Pangle SDK version 4.7.0.5.

Built and tested with:

  • Google Mobile Ads SDK version 21.2.0.
  • Pangle SDK version 4.7.0.5.

Version 4.7.0.3.0

  • Verified compatibility with Pangle SDK version 4.7.0.3.
  • The adapter now attempts to initialize the Pangle SDK before loading ads.

Built and tested with:

  • Google Mobile Ads SDK version 21.2.0.
  • Pangle SDK version 4.7.0.3.

Version 4.6.0.9.0

  • Verified compatibility with Pangle SDK version 4.6.0.9.
  • Updated the minimum required Google Mobile Ads SDK version to 21.2.0.

Built and tested with:

  • Google Mobile Ads SDK version 21.2.0.
  • Pangle SDK version 4.6.0.9.

Version 4.5.0.6.1

  • Added bidding support for native ad format.
  • Updated the minimum required Google Mobile Ads SDK version to 21.1.0.

Built and tested with:

  • Google Mobile Ads SDK version 21.1.0.
  • Pangle SDK version 4.5.0.6.

Version 4.5.0.6.0

  • Verified compatibility with Pangle SDK version 4.5.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 21.0.0.
  • Pangle SDK version 4.5.0.6.

Version 4.5.0.5.0

  • Verified compatibility with Pangle SDK version 4.5.0.5.

Built and tested with:

  • Google Mobile Ads SDK version 21.0.0.
  • Pangle SDK version 4.5.0.5.

Version 4.5.0.4.0

  • Verified compatibility with Pangle SDK version 4.5.0.4.

Built and tested with:

  • Google Mobile Ads SDK version 21.0.0.
  • Pangle SDK version 4.5.0.4.

Version 4.5.0.3.0

  • Verified compatibility with Pangle SDK version 4.5.0.3.
  • Updated compileSdkVersion and targetSdkVersion to API 31.
  • Updated the minimum required Google Mobile Ads SDK version to 21.0.0.
  • Updated the minimum required Android API level to 19.

Built and tested with:

  • Google Mobile Ads SDK version 21.0.0.
  • Pangle SDK version 4.5.0.3.

Version 4.3.0.9.0

  • Verified compatibility with Pangle SDK version 4.3.0.9.

Built and tested with:

  • Google Mobile Ads SDK version 20.6.0.
  • Pangle SDK version 4.3.0.9.

Version 4.3.0.8.0

  • Verified compatibility with Pangle SDK version 4.3.0.8.

Built and tested with:

  • Google Mobile Ads SDK version 20.6.0.
  • Pangle SDK version 4.3.0.8.

Version 4.3.0.7.0

  • Verified compatibility with Pangle SDK version 4.3.0.7.

Built and tested with:

  • Google Mobile Ads SDK version 20.6.0.
  • Pangle SDK version 4.3.0.7.

Version 4.3.0.6.0

  • Verified compatibility with Pangle SDK version 4.3.0.6.

Built and tested with:

  • Google Mobile Ads SDK version 20.6.0.
  • Pangle SDK version 4.3.0.6.

Version 4.3.0.4.0

  • Verified compatibility with Pangle SDK version 4.3.0.4.

Built and tested with:

  • Google Mobile Ads SDK version 20.6.0.
  • Pangle SDK version 4.3.0.4.

Version 4.2.5.3.0

  • Initial release!
  • Added bidding support for banner (includes MREC), interstitial and rewarded ad formats.

Built and tested with:

  • Google Mobile Ads SDK version 20.6.0.
  • Pangle SDK version 4.2.5.3.