Open Bidding Mediation Beta

This guide is intended to help you integrate Open Bidding mediation into your Android app.

Prerequisites

  • Contact your account manager to get your app whitelisted to use open bidding.
  • Set up AdMob mediation groups configured with open bidding networks.
  • Google Mobile Ads SDK 18.1.1 or higher.

Update your AndroidManifest.xml

Google Mobile Ads SDK version 18.1.1 requires that you explicitly enable Open Bidding in your AndroidManifest.xml file. Add the following <meta-data> tag shown below.

<manifest>
    <application>
        <meta-data
            android:name="com.google.android.gms.ads.flag.rtb_enabled"
            android:value="true"/>
    </application>
</manifest>

Initialize the Mobile Ads SDK

Before an open bidding adapter can participate in an ad request, it must first be initialized. This early access build adds a new API, MobileAds.initialize(Context, OnInitializationCompleteListener), that initializes open bidding adapters and calls back the completion listener once all adapters complete initialization (or after a 30 second timeout).

Call this method as early as possible, ideally in the onCreate() method of your main Activity.


import com.google.android.gms.ads.MobileAds;
import com.google.android.gms.ads.initialization.AdapterStatus;
import com.google.android.gms.ads.initialization.InitializationStatus;
import com.google.android.gms.ads.initialization.OnInitializationCompleteListener;

public class MainActivity extends AppCompatActivity {

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        MobileAds.initialize(this, new OnInitializationCompleteListener() {
            @Override
            public void onInitializationComplete(InitializationStatus initializationStatus) {
                Map<String, AdapterStatus> statusMap = initializationStatus.getAdapterStatusMap();
                for (String adapterClass : statusMap.keySet()) {
                    AdapterStatus status = statusMap.get(adapterClass);
                    Log.d("MyApp", String.format(
                            "Adapter name: %s, Description: %s, Latency: %d",
                            adapterClass, status.getDescription(), status.getLatency()));
                }

                // Start loading ads here...
            }
        });
    }
}

We recommend waiting to load ads until some point after the completion handler is called in order to ensure full participation from every ad network on the first ad request. If ads are loaded before some adapters have finished initializing, these adapters may not be ready to service ad requests and won't participate in that request.

Choose your open bidding networks

For each open bidding partner, you'll need to make changes in these places:

Third-party ad network UI
Sign up for the third-party ad network and create a placement in their UI.
AdMob UI
Update your ad unit's mediation settings to include the ad network.
App code
Update your app to include the third-party ad network's SDK, and an adapter library that communicates between Google and the third-party ad network to request and serve ads.

The ad network guides linked below walk you through each of these steps. Select an ad network below to get started.

Ad Network Banner Interstitial Rewarded Video Native Advanced
AdColony
AppLovin
Facebook
InMobi
Tapjoy

Troubleshooting

The presence of the a3p parameter in the ad request to Google indicates that at least one open bidding network is properly integrated into your app. If a3p isn't in the ad request, here are potential reasons why:

  • You did not initialize the mobile ads SDK using the new initialization method.
  • You are using the public version of the third-party ad network's adapter and forgot to install the beta version.
  • You loaded the ad before the third-party ad network's SDK was initialized. To ensure all open bidding partners can participate, we recommend waiting to load an ad until after your OnInitializationCompleteListener gets called.
  • Your AdMob ad unit doesn't target a mediation group that has an open bidding entry configured for that third-party ad network.
  • Your AdMob ad unit belongs to a different AdMob app than the one you updated in your AndroidManifest.xml file. When initialization occurs, the Google Mobile Ads SDK only pulls down information about the ad units associated with this AdMob app ID.

Send feedback about...

Need help? Visit our support page.