capacitor-community / admob

Community plugin for using Google AdMob
MIT License
221 stars 69 forks source link

Add shows in testing but not in production #157

Closed jofftiquez closed 2 years ago

jofftiquez commented 2 years ago

Describe the bug

Add shows in testing but not in production

Expected behavior

The ad banner should show in production

Screenshots

image

Smartphone (please complete the following information):

Additional context

Here's the implementation code:

 async initAdmob () {
      try {
        AdMob.initialize();

        const options = {
          adId: '<my-add-unit-id>',
          adSize: BannerAdSize.BANNER,
          position: BannerAdPosition.BOTTOM_CENTER,
          margin: 60,
          isTesting: true,
          // npa: true
        };
        AdMob.showBanner(options);
        this.$showSnack({
          message: 'Welcome! 🥳',
        });
      } catch (e) {
        console.error('error', e);
      }
    },

All I did to make it ready for prod is remove the isTesting: true in the showBanner options and after the when I reload the app the app stops on showing. I even gave it time to up to about 2 days now but the banner really doesn't show even for the version I uploaded in playstore.

P.s. there are no error either.

distante commented 2 years ago

That doesn't sound like it have anything to do with the plugin since the testing is working.

You should see which response does admob returns for your requests.

Did it ever worked without testing? If not, your account is probable not yet approved by admob.

jofftiquez commented 2 years ago

You should see which response does admob returns for your requests.

How do I do this with the plugin? Does the .initialize() or .showBanner() return something?

I am not sure about the approval but in my account it says "ready" and I don't see any warning that says otherwise.

distante commented 2 years ago

Please use the provided event listeners.

jofftiquez commented 2 years ago

Please use the provided event listeners.

I will look into it thank you.

jofftiquez commented 2 years ago

@distante I am getting:

{"code":3,"message":"Account not approved yet. https://support.google.com/admob/answer/9905175#1"}

I guess that solves it. Thank you for your help.

hijoncon commented 2 years ago

I am having the same issue, it works on iOS and in android production ads is not displaying

jofftiquez commented 2 years ago

I am having the same issue, it works on iOS and in android production ads is not displaying

@hijoncon hey man, were you able to make it work? Thanks.