Skip to main content

Overview

Backfill ads is a feature that automatically displays alternative ads when no direct ads are available, maximizing your revenue. Adrop supports major ad networks like AdMob and Pangle as backfill ad sources.
To use backfill ads, you need to install an additional dependency: io.adrop:adrop-ads-backfill

Installation

1. Gradle Configuration

Settings.gradle.kts

Add the Pangle ad network repository:
settings.gradle.kts
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url = uri("https://artifact.bytedance.com/repository/pangle") }
    }
}

Build.gradle.kts

Add the backfill ads dependency:
dependencies {
    implementation("io.adrop:adrop-ads:1.7.2")
    implementation("io.adrop:adrop-ads-backfill:1.7.2")
}

2. ProGuard Configuration

If you’re using ProGuard, add the following rules:
proguard-rules.pro
-keep class io.adrop.** { *; }
-dontwarn io.adrop.**

3. AndroidManifest.xml Configuration

If using AdMob as a backfill ad source, add the APPLICATION_ID to AndroidManifest.xml:
AndroidManifest.xml
<manifest>
    <application>
        <!-- AdMob App ID -->
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
    </application>
</manifest>
Replace ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy with your actual AdMob App ID.

Console Configuration

Enable backfill ads in the Adrop console:
  1. Log in to the Adrop Console
  2. Navigate to the Ad Units menu
  3. Select the ad unit where you want to use backfill ads
  4. Enable backfill ads in the Backfill Settings section
  5. Select the backfill ad network to use (AdMob, Pangle, etc.)
  6. Enter the network-specific settings (e.g., AdMob Ad Unit ID)

Ad Display Flow

Backfill ads are displayed in the following order:

Supported Ad Formats

Backfill ads support the following formats:
Ad FormatSupportDescription
Banner✅ SupportedFixed-size banner ads
Native✅ SupportedCustomizable native ads
Interstitial✅ SupportedFull-screen ads
Rewarded✅ SupportedRewarded ads

Checking for Backfill Ads

To check if an ad is a backfill ad, use the isBackfilled property:
AdropBanner(context, "YOUR_UNIT_ID").apply {
    listener = object : AdropAdListener() {
        override fun onAdReceived(ad: AdropAd) {
            if (ad.isBackfilled) {
                Log.d("Adrop", "Backfill ad loaded")
            } else {
                Log.d("Adrop", "Direct ad loaded")
            }
        }
    }
    load()
}

Best Practices

Enable Backfill Ads

Enable backfill ads on all ad units to maximize ad fill rate and revenue.

Set Appropriate Timeouts

Set appropriate timeouts for direct ads and backfill ads to improve user experience.

Analyze Backfill Ads

Use the isBackfilled property to track and analyze the ratio of direct ads to backfill ads.

Optimize Ad Networks

Test multiple backfill ad networks and select the one that provides the highest revenue.

Important Notes

  • To use backfill ads, you must add the io.adrop:adrop-ads-backfill dependency.
  • If using AdMob, you must add the APPLICATION_ID to AndroidManifest.xml.
  • You must comply with the policies of the backfill ad networks.