Note: With the deprecation of the AdMob v20.6.0 custom event interface, it is important to ensure compatibility. If you are currently using Pangle adapter v1.4.3 or below, please use AdMob version below 20.6.0. For more information, please refer to the link provided.If you are using AdMob v20.6.0 or above, update to Pangle adapter 2.0.0 or above and Pangle SDK v4.6.0.0 or above.
To use SDK v46, please ensure that you have set up Admob in your app. Please note that a new configuration is available for version v46, and if you plan to use this version, adapter version 2.0.0 is required.
Apps
-> + Add App
to create an app for mediation.app ID
.Ad Placements
-> + Add Ad Placement
to create the placement for mediation.placement ID
.Mediation
-> CREATE MEDIATION GROUP
to create a mediation group.ADD CUSTOM EVENT
to set with Pangle.Set Class Name
and Parameter
in the mediation setting.
If you use SDK v46 and above:(recommended)
If you use SDK v45 and below:
com.google.ads.mediation.pangle.customevent.PangleCustomEvent
directly in the Admob platform.Class Name
.Class Name
.com.bytedance.pangle.admob.adapter.demo.pangle.adapter.AdmobRewardVideoAdapter
1234567
{"placementID":"your slot ID"}
to Parameter.{"placementID":"1234567"}
Add url 'https://artifact.bytedance.com/repository/pangle'
maven in the allprojects
section of your project-level build.gradle
.
Next, open the app-level build.gradle
file for your app, add implementation 'com.pangle.global:ads-sdk:x.x.x.x'
in "dependencies" section. In order to use the Android Advertising ID, we also recommend add com.google.android.gms:play-services-ads-identifier
.
Add the following permissions and provider to your app's AndroidManifest.xml
.
Please make sure to add provider or ad loading will not work properly.
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 initialize the SDK before you send any ad requests. init
only need to be called once per app’s lifecycle, we strongly recommend doing this on app launch.
TTAdSdk.InitCallback
will be informed about the result of the initialization.
If you use TextureView for video ads and use SDK v4.3.0.0 and below, please set useTextureView(true)
in the Builder and add WAKE_LOCK
permission to the manifest.
If you use SDK v46 and above:(recommended)
If you use SDK v45 and below:
You also could check the initialization status with the following method
Please refer to Integrate Pangle SDK and Initialize Pangle SDK for manual integration and more information.
From our adapter v2.0.0, we support gradle integration.
Please open the app-level build.gradle
file for your app, add implementation 'com.pangle.global:adapter-for-admob:2.0.0'
in "dependencies" section.
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 the Android folder to your application project. They can be used with no code changes. Also, you can customize it for your use case.