You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.
When you want multiple sizes in AdManager Banner you call <GAMBannerAd> and pass the sizes attribute as an array.
However, the element has a mandatory size attribute: this is incorrect according to the SDK docs, in fact you should bu able to pass either a single size or an array of sizes.
The native implementation also leads to mixed results: the module calls requestAd() after both setSize() and setSizes(), but the requestAd() method only checks for the single size attribute to be non-null, so there's a race condition, if setSize gets called before setSizes you end up with a double call, one with a single size and one with multisize.
I needed the multisize feature for an app so I quickly fixed it for my own need, but I think the whole element should be refactored a bit to let a caller set multiple or single size and only perform one requestAd() call.
@wjaykim if you didn't already plan to change this behavior let me know and I will create a more robust PR soon as I can.
The text was updated successfully, but these errors were encountered:
Thanks @wjaykim, just checked, I left you a comment on the related commit because you accidentally broke the types declaration file, anyway thanks for the great work!
When you want multiple sizes in AdManager Banner you call
<GAMBannerAd>
and pass thesizes
attribute as an array.However, the element has a mandatory
size
attribute: this is incorrect according to the SDK docs, in fact you should bu able to pass either a single size or an array of sizes.The native implementation also leads to mixed results: the module calls
requestAd()
after bothsetSize()
andsetSizes()
, but therequestAd()
method only checks for the singlesize
attribute to be non-null, so there's a race condition, ifsetSize
gets called beforesetSizes
you end up with a double call, one with a single size and one with multisize.I needed the multisize feature for an app so I quickly fixed it for my own need, but I think the whole element should be refactored a bit to let a caller set multiple or single size and only perform one
requestAd()
call.@wjaykim if you didn't already plan to change this behavior let me know and I will create a more robust PR soon as I can.
The text was updated successfully, but these errors were encountered: