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-backfillInstallation
1. Gradle Configuration
Settings.gradle.kts
Add the Pangle ad network repository:settings.gradle.kts
Build.gradle.kts
Add the backfill ads dependency:2. AndroidManifest.xml Configuration
If using AdMob as a backfill ad source, add the APPLICATION_ID to AndroidManifest.xml:AndroidManifest.xml
Console Configuration
Enable backfill ads in the Adrop console:- Log in to the Adrop Console
- Navigate to the Ad Units menu
- Select the ad unit where you want to use backfill ads
- Enable backfill ads in the Backfill Settings section
- Select the backfill ad network to use (AdMob, Pangle, etc.)
- 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 Format | Support | Description |
|---|---|---|
| Banner | ✅ Supported | Fixed-size banner ads |
| Native | ✅ Supported | Customizable native ads |
| Interstitial | ✅ Supported | Full-screen ads |
| Rewarded | ✅ Supported | Rewarded ads |
Checking for Backfill Ads
To check if an ad is a backfill ad, use theisBackfilled property:
UMP (User Messaging Platform) Integration
Backfill SDK supports GDPR and CCPA compliance through Google UMP. Use the Consent Manager to request user consent.Basic Usage
Consent Status
| Status | Description |
|---|---|
UNKNOWN | Consent status not yet determined |
REQUIRED | Consent required (popup will be shown) |
NOT_REQUIRED | Consent not required (non-GDPR region) |
OBTAINED | Consent already obtained |
Debug Settings (Test Mode)
Test GDPR/CCPA consent flows during development:| Geography | Description |
|---|---|
DISABLED | Use actual device location |
EEA | Test GDPR (European Economic Area) |
REGULATED_US_STATE | Test CCPA (California, etc.) |
OTHER | Test non-regulated regions |
AdSense Ads in WebView
Display AdSense ads in your WebView by registering it with the Adrop SDK.AndroidManifest.xml Configuration
Add the following to yourAndroidManifest.xml to enable AdSense in WebView:
AndroidManifest.xml
Register WebView
registerWebView() automatically configures optimal WebView settings:- JavaScript enabled
- DOM storage enabled
- Media playback without user gesture
- Third-party cookies enabled
onCreate).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.