Android 開発者ページの説明通りにGoogle Play Servicesを設定して、組み込みを開始してください。Google Play Servicesの広告機能にはAndroid 2.3 以上の環境が必要なので注意してください。
アプリケーションのマニフェストファイルを更新し、 <application> タグ内に以下のタグを追加してください:
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"> <activity android:name="com.google.android.gms.ads.AdActivity" android:configchanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize">
`GooglePlayServicesBanner` クラスと `GooglePlayServicesInterstitial`クラスを 、あなたのアプリケーション内の`src/` ディレクトリにある`com.mopub.mobileads`パッケージにコピーします。 これらのクラスはMoPub のextras ディレクトリ(`extras/src/com/mopub/mobileads`)にあります。
AdMob SDKとそのカスタムイベントをアプリケーションにインストールし続ける必要がありますか?
Google は AdMob SDKを非推奨としています。我々は、Google Play Servicesへの移行を推奨します。Google Play Servicesでは、最新バージョンの AdMob SDK用に記述されたコードをそのまま使うことができます。 Google Play Servicesと Google Play のカスタムイベントを組み込むのであれば、 もう AdMob SDK とそのカスタムイベントをアプリにインストールする必要はありません。
Integrating with Google Play ServicesPlease begin by setting up Google Play Services as described on the Android Developers page. Note that the ads functionality of Google Play Services requires Android 2.3 or higher. Verify changes to your application’s manifest fileEnsure that you updated your application’s manifest file to include the following tags as children of the <application> tag: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"> <activity android:name="com.google.android.gms.ads.AdActivity" android:configchanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"> Copy over the Custom Event filesCopy the `GooglePlayServicesBanner` and `GooglePlayServicesInterstitial` classes into the `com.mopub.mobileads` package of your application’s `src/` directory. You can find these classes in the MoPub extras directory (`extras/src/com/mopub/mobileads`). FAQ:Do I need to keep the AdMob custom event and SDK installed in the application? |