2014-10-22 70 views
-1

我的問題是,Admob插頁式廣告以測試模式顯示,但如果應用已發佈,則不會顯示廣告。使用admob的插頁式廣告未在已發佈的應用中顯示

像我使用 AdRequest mAdRequest;

mAdRequest = new AdRequest.Builder() 
     .addTestDevice(AdRequest.DEVICE_ID_EMULATOR) 
     `enter code here`.addTestDevice("12312132654654232").build(); 

但在當時,釋放軟件,我用這樣的代碼這個 -

AdRequest mAdRequest; 
mAdRequest = new AdRequest.Builder().build(); 


enter code here 

此行不會顯示廣告。

+0

應用程序的鏈接 – 2014-10-22 05:57:04

+0

什麼是嘗試adsob – 2014-10-22 05:58:46

回答

1

你有沒有使用這些線在你的代碼 第一...

private InterstitialAd interstitial; 

// Create the interstitial. 
interstitial = new InterstitialAd(this); 
interstitial.setAdUnitId(MY_AD_UNIT_ID); 

然後使用代碼

// Create ad request. 
AdRequest adRequest = new AdRequest.Builder().build(); 

// Begin loading your interstitial. 
interstitial.loadAd(adRequest); 

這行,只要你想顯示添加調用此方法

// Invoke displayInterstitial() when you are ready to display an  interstitial. 

public void displayInterstitial() { 
    if (interstitial.isLoaded()) { 
    interstitial.show(); 
    } 
} 

希望這會幫助你。

+0

ys先生的新廣告....我添加了這行代碼..... – 2014-10-22 06:18:04

+0

問題得到解決...因爲我提供設備ID的MD5哈希值.... thnks for d reply – 2014-10-22 06:19:34

+0

:)祝你好運,快樂編碼.. – khurram 2014-10-22 06:21:05

相關問題