十天前我發佈了我的應用,現在我收到了此消息。我不知道如何解決這個與互聯網和計算器中的信息。AdMob with google.com示例
我們發現您的應用違反了潛在的廣告ID政策。有關詳細信息,請查看所有應用程序頁面中列出的標記的應用程序。
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
sInstance = this;
mInterstitialAd = new InterstitialAd(this);
mInterstitialAd.setAdUnitId("ca-app-pub-****************/**********");
requestNewInterstitial();
mInterstitialAd.setAdListener(new AdListener() {
@Override
public void onAdClosed() {
requestNewInterstitial();
}
});
startAd();
}
void showAd() {
mInterstitialAd.show();
mLastAd = System.currentTimeMillis();
}
private void requestNewInterstitial() {
if (MyApplication.getInstance().isAdEnabled()) {
AdRequest adRequest = new AdRequest.Builder()
.build();
mInterstitialAd.loadAd(adRequest);
}
}
private void startAd() {
if (MyApplication.getInstance().isAdEnabled()) {
final Handler handler = new Handler();
Runnable runnable = new Runnable() {
@Override
public void run() {
if (mInterstitialAd.isLoaded()) {
showAd();
} else {
handler.postDelayed(this, 100);
}
}
};
handler.postDelayed(runnable, 1000);
}
}
我編譯如下:
compile 'com.google.android.gms:play-services:7.0.0'
,我的清單是同樣喜歡
https://developers.google.com/mobile-ads-sdk/docs/admob/android/play-migration
這是我的第一個應用程序,並先用使用產生只是AdMob廣告一些歐元。
我不明白:-(使用我的「ca-app-pub-****************/******** **「從創建的admob初始廣告? – dino368
是否允許點擊我自己的廣告?我應該爲我的私人智能手機實施.addTestDevice()嗎?因爲我點擊了過去的廣告。 – dino368
使用addTestDevice時你自己的設備 – itechevo