2014-10-22 71 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

相关问题