I tried reporting this as a bug, but they just blew me off without even testing, so… I’ll just offer this as a FYI:
If you’re doing dynamic content sizing (like “ultimate config” tutorials), particularly on Android (since there are so many more resolutions out there), and particularly if in landscape orientation (don’t know why, but is true)… then you may not be getting banner ads on all devices.
If you pay close attention to the logcat on a “bad” device you’ll see something like:
W/Ads ( 5791): Invalid admob request error: [Ad size will not fit on screen] W/Ads ( 5740): There was a problem getting an ad response. ErrorCode: 1 W/Ads ( 5740): Failed to load ad: 1
My guess is there’s something wrong with the “math” for sizing the ad-request vs the ad-view, with all these fractional scaled coordinate floating around, (maybe something being rounded that should be truncated, or vice versa, etc) but don’t really know what’s actually failing internally. All I know is that code that works consistently fine on devices of one resolution will consistently fail on devices of another resolution. (the device make/model don’t seem to matter, just their native resolution, thus the resulting content scale)
If you dump the corresponding event.response, you get this somewhat less-helpful message:
The ad request was invalid; for instance, the ad unit ID was incorrect.
(of course, i’m testing with known valid ad unit ID’s that have been active and serving for a long time, where same code/same apk works fine on some device resolutions, so “ad unit ID was incorrect” is a red herring)
I haven’t found a workaround. Tried various scaling “letterBox”, “zoomEven”, “zoomStretch”, and altering my content width/height, all for nothing, because at best the most I could achieve is altering WHICH resolutions would have the problem.
(that is, for example, If I altered my content size to 500x750 and used zoomStretch instead of letterBox I might fix it when running at 480x800, but then 600x1024 which had been working before, would now be one of the trouble ones instead. not that I’m in a position to actually DO that for production, but just as an experiment while trying to figure this out)
All this with just the simplest possible config.lua, just "width=480, height=640, scale=“letterBox”, and landscape orientation in build.settings. (and the admob plugin itself, of course, and its required permissions)
Just a heads up that you might want to test on multiple devices if you wanna actually get paid.