AndriousSolutions / ads

Other
58 stars 11 forks source link

i am only getting test ads even after using the actual ads unit id #7

Closed cimplesid closed 5 years ago

cimplesid commented 5 years ago

@Andrious please clarify it

Ads.init('ca-app-pub-8206477567546963/6817444898', testing: false);
    Ads.setFullScreenAd(adUnitId: 'ca-app-pub-8206477567546963/6817444898');

even after using these why am i getting test ads only

Andrious commented 5 years ago

I see the example code you represent here is using 'the same' id in both the 'app id' and in the 'unit id' Was that intentional? If it was intentional, that would be incorrect. They have to be distinct. It's your Google AdMob Dashboard, where one have the means to attain an individual 'unit id.'

Google now has us use both a 'unit id' and the 'app id.' Two separate class of id's: Find your app IDs & ad unit IDs

Regards,

Greg

cimplesid commented 5 years ago

@Andrious youean ads.init is for appid and anoth for ad unit id

Andrious commented 5 years ago

Are they the same? They must not be the same. 'ca-app-pub-8206477567546963/6817444898' 'ca-app-pub-8206477567546963/6817444898'

cimplesid commented 5 years ago

thankyou i got it but ad is not loaded how ever it giv error code 3 which is not a error actually but when will it appear is the question

On Sun, May 26, 2019 at 10:44 PM Andrious Solutions < notifications@github.com> wrote:

Are they the same? They must not be the same. 'ca-app-pub-8206477567546963/6817444898' 'ca-app-pub-8206477567546963/6817444898'

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/AndriousSolutions/ads/issues/7?email_source=notifications&email_token=AHEQYHDJEKCXS3SBK2YVALTPXK6XPA5CNFSM4HPWH5NKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWIJRKI#issuecomment-496015529, or mute the thread https://github.com/notifications/unsubscribe-auth/AHEQYHACVBTWPYYCSS5YCD3PXK6XPANCNFSM4HPWH5NA .

Andrious commented 5 years ago

Ah yes! Yes, that 'Failed to load ad: 3' error is a frustrating error, isn't. lol

I'm afraid the only solution to that error is...time.

As the documentation describes: "This may happen particularly if you have just registered your AdMob publisher ID, as it takes some time and multiple requests before the new ID starts returning ads." - failed to load ad : 3

It would seem everyone asks about that error: failed to load ad : 3

cimplesid commented 5 years ago

@Andrious i have just published app to store and now i am getting test ads bro how to fix this is serious issue https://play.google.com/store/apps/details?id=com.quotesnepal.quotesnepal

Andrious commented 5 years ago

To fix the issue was to wait for it to fix itself. As it stated in the documentation, it takes Google time to appreciate your registration with them and to then receive legitimate ads. Days if not hours.

You and I can not fix the issue...it isn't a issue. Well, it's only an issue since you chose to publish your app and not to wait. ;)

cimplesid commented 5 years ago

@Andrious what if i replaced the test ad unit id of plugin with my ad unit will it help any

Andrious commented 5 years ago

It would. When did you register and acquire your 'app id' and your 'ad unit id'? Please, be specific in your response. Best practice is to acquire such id's three business days at least before you then publish your app. I would suggest that would likely guarantee you'd have your ads displaying successfully in your app.

cimplesid commented 5 years ago

just today earlier and i have selected the option that app is not published in playstore because i did make the ad earlier .will that cause trouble just to be sure please review the code


 Ads.init(
      'ca-app-pub-8206477567546963~1756689904',
    );
    Ads.setFullScreenAd(
        adUnitId: 'ca-app-pub-8206477567546963/6817444898',
        listener: Ads.eventListener = (MobileAdEvent event) {
          switch (event) {
            case MobileAdEvent.loaded:
              print('loaded');
              break;

            case MobileAdEvent.failedToLoad:
              print('failed to loaded ');
              break;
            case MobileAdEvent.clicked:
              break;
            case MobileAdEvent.impression:
              break;
            case MobileAdEvent.opened:
              break;
            case MobileAdEvent.leftApplication:
              break;
            case MobileAdEvent.closed:
              break;
          }
        });

and i have button that call

Ads.showFullScreenAd(state: this);

@Andrious

Andrious commented 5 years ago

The code looks good to me. You're doing a great job. However, at times, there's things beyond our control. Google needs time to process your registration.

You just registered earlier, today. True, काम साछे आफु लाई, खाना साछे अरुलाई! (There's no time like the present!) However, in this case, wait til tomorrow, my friend. I suspect you'll find your ads successfully coming tomorrow.

Greg

I can only offer that as a solution for now. If the ads are still not coming in twelve to twenty-four hours, we'll review the code and your particular issue again.

cimplesid commented 5 years ago

@Andrious thanks mate ads just showed up thx for evry thing and lastly are u nepali

Andrious commented 5 years ago

Excellent to hear! Well done.

However, looking again at the code your provided me, upon longer inspection, I do believe you have a little bit of confusion there. When assigning a listener, I believe you've got two separate approaches incorporated into one. In the examples below, I've separated the two approaches.

 Ads.init(
      'ca-app-pub-8206477567546963~1756689904',
    );
    Ads.setFullScreenAd(
        adUnitId: 'ca-app-pub-8206477567546963/6817444898',
        listener: (MobileAdEvent event) {
          switch (event) {
            case MobileAdEvent.loaded:
              print('loaded');
              break;
            case MobileAdEvent.failedToLoad:
              print('failed to loaded ');
              break;
            case MobileAdEvent.clicked:
              break;
            case MobileAdEvent.impression:
              break;
            case MobileAdEvent.opened:
              break;
            case MobileAdEvent.leftApplication:
              break;
            case MobileAdEvent.closed:
              break;
          }
        });

An alternative, is to assign the listener in a separate command using the getter, eventListener.

 Ads.init(
      'ca-app-pub-8206477567546963~1756689904',
    );
    Ads.setFullScreenAd(
        adUnitId: 'ca-app-pub-8206477567546963/6817444898',
    );

      Ads.eventListener = (MobileAdEvent event) {
          switch (event) {
            case MobileAdEvent.loaded:
              print('loaded');
              break;
            case MobileAdEvent.failedToLoad:
              print('failed to loaded ');
              break;
            case MobileAdEvent.clicked:
              break;
            case MobileAdEvent.impression:
              break;
            case MobileAdEvent.opened:
              break;
            case MobileAdEvent.leftApplication:
              break;
            case MobileAdEvent.closed:
              break;
          };
Andrious commented 5 years ago

I will keep this issue 'open' so it is readily available to others who may also encounter that persistent error, 'Failed to load ad: 3.'