Test ads showing but original ads not showing in phonegap build app in Google admob

i have created a simple app in Phonegap build ,and integrated and linked the app with Google admob ,when i test the app in test ads mode it showing the test ads ,but as i published the app on google play it doesn't showing original ads .

My Code For Preparing ads

var admobid = {}; if( /(android)/i.test(navigator.userAgent) ) { admobid = { // for Android banner: 'ca-app-pub-5584769932279177/2482584044', interstitial: 'ca-app-pub-5584769932279177/1005850846' }; } else if(/(ipod|iphone|ipad)/i.test(navigator.userAgent)) { admobid = { // for iOS banner: '', interstitial: '' }; } else { admobid = { // for Windows Phone banner: '', interstitial: '' }; } function initApp() { if (AdMob) { AdMob.setOptions({ bgColor: 'black', // color name, or '#RRGGBB' });

AdMob.createBanner({ adId : admobid.banner, position : AdMob.AD_POSITION.BOTTOM_CENTER, autoShow : true }); } if(AdMob){ AdMob.prepareInterstitial({ adId:admobid.interstitial, autoShow:false } ); } }

if(( /(ipad|iphone|ipod|android|windows phone)/i.test(navigator.userAgent) )) { document.addEventListener('deviceready', initApp, false); } else { initApp(); }

Code for Showing Interstitial Ads

window.onload=function(){

window.onbeforeunload = function(){ if(AdMob) AdMob.showInterstitial(); }; }

And also included the following lines in my config file

<preference name="android-build-tool" value="gradle" /> <gap:plugin name="cordova-plugin-admobpro" source="npm" />

Answers


To wait check and approve (up to 2 days).


Generally this happens because no ads is available in that region where you are testing, if it is displaying test ads it will show the ads if available. your Code is correct if it is showing the Test ads or the ads are taking time to load


Need Your Help

How do we enforce a bidirectional interface with a Java Interface?

java interface private observer-pattern

Java does not allow private or protected methods, so how do we ensure implementors of a bidirectional interface call the necessary methods?

trigger input in karma/jasmine test in angular.js

angularjs jasmine karma-runner

I'm trying to test change events in an angular directive I've written, and I've seen documentation where people do things like input('text').enter('changed value'), but I keep getting errors Object...