+1
I’ve been trying to “reverse engineer” their logic just based on experimentation, and it’s seemingly impossible, at least on Android. (and i DO understand all about screen density, screen size classes, etc)
For example, on my 2012 Nexus 7:
800x1280 pixels
213 tvdpi (so a 213/160=1.33125 density relative to “normal” 160dpi)
so 600x961 dps (device-independent pixels)
so in the “large” screen threshold, so aka a “tablet”
Aside: Corona only “sees” 800x1205 of those pixels (due to soft bar) but even if THAT is the value used, it STILL fall in the large/tablet class.
Corona does properly return 213 dpi, so “in theory” I have everything I need to determine device/orientation/tablet and make a good guess at the format that admob will return, but it doesn’t quite work out…
So, portrait orientation app, contentWidth/Height set to exactly 800x1205 for this specific test device, letterbox scaling, contentScaleX/Y verified to be 1.0,1.0, etc… am expecting a 800x90 banner, as per: https://developers.google.com/mobile-ads-sdk/docs/admob/smart-banners
Which ought to perfectly fit width, so ought to require no scaling, so height ought to remain 90 device pixels, right? Wow, this should be the perfect type of device to begin reverse-engineering the plugin’s sizing math, right?
Wrong. I can watch the logcat and see it’s actually requesting/receiving the 600x90 format (tho I’m pretty sure a Nexus 7 is not a “Kindle Fire”).
This is purely a diagnostic app, with a “pixel ruler” background displayed, at exactly 1:1 content-pixel scale, and additionally measuring a live screenshot from device will all confirm that the displayed ad has been scaled up to fit width 800px, thus resulting height is 120px (90 px original height * 800/600 horizontal scale = 120px ad height)
If I *KNEW* which ad format I’d be getting, I could deal with display.contentScaleX/Y to determine what those 120 (or whatever) device pixels work out to in my content pixels. But the admob plugin is just a big obscure black box, confounding me at every turn.