Open Bidding Mediation Beta

This guide is intended to help you integrate Open Bidding mediation into your Android app via an early access build of the Google Mobile Ads Android SDK.

Download early build

Prerequisites

  • Contact your account manager to get your app whitelisted to use open bidding.
  • Set up AdMob mediation groups configured with open bidding networks.
  • Download the early build from the link above, and install it using these instructions. The version for this build is 16.7.1.

Update your AndroidManifest.xml

Add your AdMob App ID to your app's AndroidManifest.xml file by adding the <meta-data> tag shown below. You can find your App ID in the AdMob UI. For android:value insert your own AdMob App ID in quotes, as shown below.

<manifest>
    <application>
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
    </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
AppLovin
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 initialized with. When initialization occurs, the Google Mobile Ads SDK only pulls down information about the ad units from the AdMob app ID you initialized.

Send feedback about...

Need help? Visit our support page.