ne s'affichent pas lorsqu'Admob Live affiche des annonces diffusées, les annonces en direct ne s'affichent pas du tout, je ne sais pas ce qui me manque.Les annonces Admob en direct ne s'affichent pas dans mon application, tandis que les annonces test
Voici le code.
String.java XML
<!-- Insert Id admob -->
<string name="BannerAd_unit_id">cca-app-pub-1154915214031679/2100011458</string>
<string name="InterstitialAd_unit_id">ca-app-pub-1154915214031679/9049914448</string>
MainGame.Java Classe
this.BANNER_AD_UNIT_ID = getResources().getString(R.string.BannerAd_unit_id);
showBanner();
écran java.class
public void showBanner() {
//banner ad
if (BANNER_AD_UNIT_ID.length() > 0) {
// Create an ad.
adView = new AdView(this);
adView.setAdSize(AdSize.BANNER);
adView.setAdUnitId(BANNER_AD_UNIT_ID);
//make ad visible on bottom of screen
RelativeLayout.LayoutParams params1 = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
params1.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);
params1.addRule(RelativeLayout.CENTER_HORIZONTAL);
adView.setLayoutParams(params1);
layout.addView(adView);
// Create an ad request. Check logcat output for the hashed device ID to
// get test ads on a physical device.
AdRequest adRequest = new AdRequest.Builder()
//.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
//.addTestDevice("C01834A0B4A8FA4C03A0E09605F43819")//GalaxyS4*/
.build();
// Start loading the ad in the background.
adView.loadAd(adRequest);
}
}
ici Si je Supprimer le commentaire ".addTestDevice" tester ensuite des annonces montrant , SI je le commente alors les annonces en direct ne montrent pas. Je ne sais pas ce qui ne va pas, toute aide sera appréciée.
Copie possible de [Pourquoi une bannière Admob ne s'affiche-t-elle pas? \ [Android, libGDX \]] (https://stackoverflow.com/questions/46303819/why-does-an-admob-banner-ad-doesnt-show-to-me-android-libgdx) – Aryan