SSP広告ネットワークをAdMob Ads SDKに追加するには、AdMobから発行されるメディエーションIDを設定することで対応できます。
Google AdMob Ads SDKを組み込んだ部分のコードでパブリッシャーIDを記述している箇所をメディエーションIDに変更します。
サンプルコードを以下に示します。
package jp.co.geniee.sdksampleadmobadapter; import jp.co.geniee.sdksampleadmobadapter.R; import android.os.Bundle; import android.app.Activity; import android.widget.LinearLayout; import com.google.android.gms.ads.*; public class GenieeSampleAdMobAdapter extends Activity { private AdView adView; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); // Create the adView. adView = new AdView(this); // Set AdMob_Mediation_ID adView.setAdUnitId("AdMob_Mediation_ID"); adView.setAdSize(AdSize.BANNER); // Add the AdView to the view hierarchy. The view will have no size // until the ad is loaded. This code assumes you have a LinearLayout with // attribute android:id="@+id/mainLayout" in your main.xml. LinearLayout layout = (LinearLayout)findViewById(R.id.mainLayout); layout.addView(adView); // Start loading the ad in the background. AdRequest adRequest = new AdRequest.Builder().build(); adView.loadAd(adRequest); } @Override public void onDestroy() { if (adView != null) { adView.destroy(); } super.onDestroy(); } @Override public void onPause() { if (adView != null) { adView.pause(); } super.onPause(); } @Override public void onResume() { super.onResume(); if (adView != null) { adView.resume(); } } }