AndriousSolutions / ads

Other
58 stars 11 forks source link

Need clarification for Ad Unit ID #4

Closed lab-nit-s closed 5 years ago

lab-nit-s commented 5 years ago

Hello, first of all, this is a great wrapper that you have written.

I have one confusion though. In the code below for setBanner

/// Set the Banner Ad options.
  static void setBannerAd({
    AdSize size = AdSize.banner,
    List<String> keywords,
    String contentUrl,
    bool childDirected,
    List<String> testDevices,
    AdEventListener listener,
  }) {
    var info = _targetInfo(
      keywords: keywords,
      contentUrl: contentUrl,
      childDirected: childDirected,
      testDevices: testDevices,
    );

    if (listener != null) banner._eventListeners.add(listener);

    _bannerAd = BannerAd(
      adUnitId: Ads.testing ? BannerAd.testAdUnitId : Ads._appId,
      size: size,
      targetingInfo: info,
      listener: banner._eventListener,
    );
  }

you are doing this

adUnitId: Ads.testing ? BannerAd.testAdUnitId : Ads._appId,

if testing is true you are using BannerAd.testAdUnitId otherwise you are using the _appId that was providences in Ads.init

Should we not be using a different BannerAdUnitID instead of the _appId?. Or is it ok to use the ApID instead of adUnitID for production app ??

Andrious commented 5 years ago

Hi there. I'll look into this and get back to you shortly.

Andrious commented 5 years ago

I'm not understanding this sentence, ' Or is it ok to use the ApID instead of adUnitID for production app ??'

You are to use the _appId that was provided in Ads.init when in production. Yes. The code is correct.

I not certain of your statement, 'Should we not be using a different BannerAdUnitID instead of the _appId?'

Why would you use a different BannerAdUnitID instead of the _appId?

lab-nit-s commented 5 years ago

The App has an Admob id. The banner/interstitial/rewarded ads have their own unit ids.

What I am saying is the the Id provided in init is not a banner ad unit id.

What we want to pass in setBanner is the BannerAdUnit id. Not the Admob App id.

On Mon, 20 May 2019 at 9:16 PM, Andrious Solutions notifications@github.com wrote:

I'm not understanding this sentence, ' Or is it ok to use the ApID instead of adUnitID for production app ??'

Let's be certain what is the 'BannerAdUnitID' or 'adUnitID?' you're referring to.

You are to use the _appId that was provided in Ads.init when in production. Yes. The code is correct.

Are you maybe interpreting the 'AdMob documentation' a little differently than I. Is that why I'm not understanding your confusion?

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

Andrious commented 5 years ago

I see the issue now. It will be addressed, today.

Andrious commented 5 years ago

Ads version 0.4.0 has addressed the recent requirement to supply a separate unit id per type of ad.