sunnycupertino / cordova-plugin-admob-simple

Cordova plugin allowing Admob interstitials and banner ads.
MIT License
164 stars 150 forks source link

Android shows just black space #20

Closed wo-github closed 7 years ago

wo-github commented 7 years ago

Hello, we use this plugin to show ads. With ios it works, but on android there are problems. If we set in the config isTesting = true, the testbanner is shown. But if we change to isTesting = false, there is just a black space, instead of the banner

With isTesting = false livebanner

With isTesting = true testbanner

Our config: window.plugins.AdMob.setOptions( { publisherId: admobid.banner, interstitialAdId: admobid.interstitial, adSize: window.plugins.AdMob.AD_SIZE.SMART_BANNER, bannerAtTop: false, overlap: false, offsetTopBar: false, isTesting: true, autoShow: false });

call the banner: window.plugins.AdMob.createBannerView();

sunnycupertino commented 7 years ago

This can happen if the ad ID is still new. Admob doesnt serve ads sometimes for 24 hours. Please let us know if it still happens after that time.

wo-github commented 7 years ago

No this doesn`t work. If I add this event listener document.addEventListener('onFailedToReceiveAd', function(data){}); there is this internal error.

error

That description isn`t helpfull.

sunnycupertino commented 7 years ago

If the test ads work, then this is a problem from the admob end. Admob does not 'trust' your app for some reason.

Can you tell us the app id?

Do you run this in the emulator or on a real device?

If it's on a real device, is the apk signed?

wo-github commented 7 years ago

This happens after install the app on a real device with "phonegap run android". What is the role of the AppId?

sunnycupertino commented 7 years ago

Is the app signed?

The appid might be already used by someone else. If you tell me I can check.

wo-github commented 7 years ago

This helps, thank you. You have to build a signed app. It doens`t work with "phonegap run android". It would be nice, if there is a error message, with this information.

sunnycupertino commented 7 years ago

You're welcome, glad to hear it.