Ad
9: 2016-08-13 (土) 20:22:20 njf ソース バックアップ No.9 を復元して編集 現: 2019-04-25 (木) 20:27:54 njf ソース 編集
Line 76: Line 76:
Finishボタンを押せばライブラリが作成されます。 Finishボタンを押せばライブラリが作成されます。
-*Google Play Servicesの追加 [#ua4e58f1]+*Google Play Servicesの追加 (現在は不要)[#ua4e58f1]
 +&font(Red){----アップデートにより、このセクションの手順は意味がなくなったので飛ばしてください-----&br;};
(この部分については[[公式ページ:https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start?hl=ja]]も参考にして下さい。) (この部分については[[公式ページ:https://developers.google.com/mobile-ads-sdk/docs/admob/android/quick-start?hl=ja]]も参考にして下さい。)
Line 290: Line 291:
         super.onCreate(savedInstanceState);          super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_main);          setContentView(R.layout.activity_main);
 + 
         aneAdmob = new ANEAdmob(this);          aneAdmob = new ANEAdmob(this);
 + 
         aneAdmob.setAppID(APP_ID);          aneAdmob.setAppID(APP_ID);
         aneAdmob.setBannerID(BANNER_ID);          aneAdmob.setBannerID(BANNER_ID);
         aneAdmob.setInterstitialID(INTER_ID);          aneAdmob.setInterstitialID(INTER_ID);
 + 
         Button button = (Button) findViewById(R.id.showBannerBtn);          Button button = (Button) findViewById(R.id.showBannerBtn);
 + 
         assert button != null;          assert button != null;
         button.setOnClickListener(new View.OnClickListener() {          button.setOnClickListener(new View.OnClickListener() {
Line 305: Line 306:
                                           aneAdmob.showBanner();                                            aneAdmob.showBanner();
                                       }                                        }
 + 
                                   }                                    }
         );          );
 + 
         button = (Button) findViewById(R.id.hideBannerBtn);          button = (Button) findViewById(R.id.hideBannerBtn);
 + 
         assert button != null;          assert button != null;
         button.setOnClickListener(new View.OnClickListener() {          button.setOnClickListener(new View.OnClickListener() {
Line 317: Line 318:
                                           aneAdmob.hideBanner();                                            aneAdmob.hideBanner();
                                       }                                        }
 + 
                                   }                                    }
         );          );
         button = (Button) findViewById(R.id.loadInterstitialBtn);          button = (Button) findViewById(R.id.loadInterstitialBtn);
 + 
         assert button != null;          assert button != null;
         button.setOnClickListener(new View.OnClickListener() {          button.setOnClickListener(new View.OnClickListener() {
Line 328: Line 329:
                                           aneAdmob.loadInterstitial();                                            aneAdmob.loadInterstitial();
                                       }                                        }
 + 
                                   }                                    }
         );          );
 + 
         button = (Button) findViewById(R.id.showInterstitialBtn);          button = (Button) findViewById(R.id.showInterstitialBtn);
 + 
         assert button != null;          assert button != null;
         button.setOnClickListener(new View.OnClickListener() {          button.setOnClickListener(new View.OnClickListener() {
Line 340: Line 341:
                                           aneAdmob.showInterstitial();                                            aneAdmob.showInterstitial();
                                       }                                        }
 + 
                                   }                                    }
         );          );
 + 
     }      }
Line 394: Line 395:
               return result;                return result;
           }            }
 + 
           @Override            @Override
           public void dispose() {            public void dispose() {
 + 
           }            }
       };        };
Line 421: Line 422:
           Log.w("njf.jp.aneadmob", "ANEAdmobFREFunction:can't parse : arg 1");            Log.w("njf.jp.aneadmob", "ANEAdmobFREFunction:can't parse : arg 1");
       }        }
 + 
       if(aneAdmob == null){        if(aneAdmob == null){
           aneAdmob = new ANEAdmob(freContext.getActivity());            aneAdmob = new ANEAdmob(freContext.getActivity());
       }        }
 + 
       if(method.equals("setAppID") && !prm.equals("")){        if(method.equals("setAppID") && !prm.equals("")){
           aneAdmob.setAppID(prm);            aneAdmob.setAppID(prm);


トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード印刷に適した表示   ページ新規作成 全ページ一覧 単語検索 最新ページの一覧   ヘルプ   最新ページのRSS 1.0 最新ページのRSS 2.0 最新ページのRSS Atom Powered by xpWiki
Counter: 2767, today: 1, yesterday: 0
MenuBar
広告

ログイン

ユーザー名:


パスワード:





パスワード紛失

Portuguese | English | German | Greek | Japanese | Korean | Russian | T-Chinese top
NJF