1

I am trying to show the rewarded video ads in ionic 3 using ionic admobFree native plugin. I am able to show the banner and interstitial ads but RewardedVideo ads appears does not show every time. Because RewardedVideo Ad appears sometimes that means I must be doing things right. I have tried to show the test ads as well but rewardedVideo ad doesn't show as test ad either. Is there some kind of setting in admob that is causing this kind of behaviour because I am not getting any error but errors. here is my code.

let adConfig: AdMobFreeRewardVideoConfig = {
    isTesting: false, // Remove in production
    autoShow: true,
    id: 'ca-app-pub-3940256099942544/5224354917'
  };

  this.admob.rewardVideo.config(adConfig);
  this.admob.rewardVideo.prepare().then((resp) => {
    console.log('admob rewarded prepared', resp);
  }).catch(e => {
    console.log(e)
  });
Saad Ali
  • 11
  • 3

1 Answers1

0

Your code is right and will work perfectly fine it's just admob doesn't have an ad for your app and you current region.

I was facing the same issue and after a lot of searching and finally hooking all the videorewardAd events I found out in this event "admob.rewardvideo.events.LOAD_FAIL" that my ad was being failed to load. Luckily this event threw an error message 'No fill' and an error code 3. I then searched about this error and found out that my ad request was successful, but no ad was returned due to lack of ad inventory. Check out this link for error code 3 description.

So what can you do here: first hook all the rewardVideoAd events and if you get the same error message and code I just told you about then you can check out the above link to read more about adRequest errors and error_code 3. Here is another link to a stackoverflow question regarding this issue.

Junaid
  • 4,682
  • 1
  • 34
  • 40