Help Center/Details/

[Android]Google Ad Manager Custom Event for Pangle

Please set Google Ad Manager in your app first.

Setup Pangle Platform

Create a Pangle account

Create an application and placements in Pangle

  • Click Apps -> + Add App to create a app for mediation.



  • You will get an app with its app ID.


Create Ad Placement

  • Click Ad Placements -> + Add Ad Placement to create the placement for mediation.


  • Select the ad's type for your app and finish the create.


  • You will get a placement with its placement ID.


Add Pangle to Google Ad Manager

Create mediation

Open Delivery section, click Yield Group -> New Yield GROUP to create a mediation group.

截屏2021-09-10 上午1.15.55.png

  • Select the same ad format which created on Pangle side and Mobile App for Inventory type,

截屏2021-09-10 上午1.16.47.png

  • After select the ad unit you created on Google Ad Manger which you want to embed mediation, click ADD Yield Partner to set with Pangle.

截屏2021-09-10 上午1.18.15.png

  • Enter the yield partner (create a new yield partner for Pangle if you do not have one), then select Custome Event on integration type and platform based on your OS.

截屏2021-09-10 上午1.35.48.png

Set Class Name and Parameter

Set Label, Class Name and Parameter in the mediation setting.

截屏2021-09-10 上午1.20.25.png

Class Name

If you are using gradle to integrate our adapters, please copy the contents below to Class Name .

Ad Type Class Name
Reward Video Ads
Interstitial(Fullscreen Video) Ads
Banner Ads
Native Ads

Else if you are integrating our adapters by manual, please add adapter's package + adapter'class name to Class Name.

Ad Type adapter'class name (need add package of your app )
Reward Video Ads AdmobRewardVideoAdapter
Interstitial(Fullscreen Video) Ads AdmobFullScreenVideoAdapter
Banner Ads AdmobTemplateBannerAdapter
Native Ads AdmobNativeFeedAdAdapter
  • for example,com.bytedance.pangle.admob.adapter.demo.pangle.adapter.AdmobRewardVideoAdapter



Add {"placementID":"your slot ID"} to Parameter.

  • Parameter: Add {"placementID":"your placement ID on Pangle"} to Parameter , for example,{"placementID":"1234567"}

  • Please make sure to use JSON to set Parameter. Or you need to customize adapter yourself.

Initialize Pangle SDK and Adapter

Import and Init Pangle SDK

Add url '' maven in the allprojects section of your project-level build.gradle.

allprojects {
    repositories {
      maven {
        url ''

Next, open the app-level build.gradle file for your app, add implementation '' in "dependencies" section.
In order to use the Android Advertising ID, we also recommend add

dependencies {
    implementation ''
    implementation ''


Add following permissions and provider to your app's AndroidManifest.xml.

:warning: Please make sure to add provider or ad's loading will not work properly.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""

    <!--Required  permissions-->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <!-- If there is a video ad and it is played with textureView, please be sure to add this, otherwise a black screen will appear -->
    <uses-permission android:name="android.permission.WAKE_LOCK" />

            android:exported="false" />




Initialize Pangle SDK asynchronously is supported since the v3.5.0.0 SDK, please call TTAdSdk.init(final Context var0, final TTAdConfig var1, final TTAdSdk.InitCallback var2) to initializes the SDK before you send any ad requests. init only need to be called once per app’s lifecycle, we strongly recommend to do this on app launch.

TTAdSdk.InitCallback will be informed about the result of the initialize.

If you use TextureView for video ads, please set useTextureView(true) in the Builder and add add WAKE_LOCK permission in the manifest.

class PangleApplication: Application() {

    override fun onCreate() {

        if (BuildConfig.DEBUG) {


    private fun initSdk() {
        TTAdSdk.init(this, buildAdConfig(), mInitCallback)

    private val mInitCallback: TTAdSdk.InitCallback = object : TTAdSdk.InitCallback {
        override fun success() {
            Timber.d("init succeeded")

        override fun fail(p0: Int, p1: String?) {
            Timber.d("init failed. reason = $p1")

    private fun buildAdConfig(): TTAdConfig {
        return TTAdConfig.Builder()
            // Please use your own appId,
            // Turn it on during the testing phase, you can troubleshoot with the log, remove it after launching the app
            // The default setting is SurfaceView. We strongly recommend to set this to true.
            // If using TextureView to play the video, please set this and add "WAKE_LOCK" permission in manifest
            // Fields to indicate whether you are a child or an adult ,0:adult ,1:child

You also could check the initialization status with the method TTAdSdk.isInitSuccess()

private fun checkInitResult(): Boolean {
   return TTAdSdk.isInitSuccess()

Please refer to Integrate Pangle SDK
and Initialize Pangle SDK for manual integration and more information.

Embed Pangle Adapters

Gradle (preferred)

From our adapter v1.4.0, we support gradle integration.

Please open the app-level build.gradle file for your app, add implementation '' in "dependencies" section.

Manual download

  • Click SDK Integration -> SDK download, you can download adapters for different ad formats from your Pangle platform.



Please unzip the file and add adapter files from Android folder into your application project. They can be used with no code changes. Also you can customize it for your use case.



  • You can find simple use cases from Demo.
Did the content solve your problem?