Created
December 21, 2011 09:11
-
-
Save kimukou/1505334 to your computer and use it in GitHub Desktop.
AdMob_4.3.1Setting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AdView adView = (AdView)this.findViewById(R.id.adView); | |
adView.setAdListener(new AdListener() {}); //表示がでないときのリスナー登録 | |
//参考:http://blogs.yahoo.co.jp/sao_kun2000/27732792.html | |
AdRequest adRequest = new AdRequest(); | |
//adRequest.setTesting(true); //テスト表示モード | |
adView.loadAd(adRequest); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<activity android:name="com.google.ads.AdActivity" | |
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
<uses-sdk android:minSdkVersion="4" /> //動かすAndroidバージョン |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:ads="http://schemas.android.com/apk/lib/com.google.ads" | |
android:id="@+id/AdMob" | |
android:layout_width="320dip" | |
android:layout_height="70dp" | |
android:gravity="center_horizontal"> | |
<com.google.ads.AdView android:id="@+id/adView" | |
android:layout_width="fill_parent" | |
android:layout_height="wrap_content" | |
ads:adUnitId="xxxxxxxxxxxx" | |
ads:adSize="BANNER" | |
ads:loadAdOnCreate="true" /> | |
</LinearLayout> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download) | |
http://code.google.com/intl/ja/mobile/ads/download.html | |
Doc) | |
http://code.google.com/intl/ja/mobile/ads/docs/android/banner_xml.html | |
Binary) | |
GoogleAdMobAdsSdk-4.3.1.jar | |
参考) | |
http://d.hatena.ne.jp/unagi_brandnew/20110515/1305413282 | |
http://androyer.blogspot.com/2011/12/admob-version-431.html | |
備考) | |
プロジェクトとしてはAndroid 4.0 | |
動かせるバージョンは 1.6以上 | |
という指定は結構気持ち悪い〜 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target=android-14 //13以上からAndroidManifest.xmlで定義されるフラグが使われる |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment