Rob,
Below is a small sample app, config.lua, build.settings and output from two devices that show the scaling issue that I am seeing. Note the gray box that I display behind the ads that are 320x50 and how the ads do not scale to fit those boxes using “letterbox”.
Any help is greatly appreciated!
Scott
MAIN.LUA display.setStatusBar( display.HiddenStatusBar ) local util = require("Utility") -- setup Corona Ads coronaAds = require( "plugin.coronaAds" ) coronaAdsKey = "5223c2c3-cf81-4c43-ae41-2d4ed16552bc" -- Corona's test account bannerPlacement = "bottom-banner-320x50" -- listener for Corona Ads function coronaAdsListener( event ) print("coronaAdsListener", event.phase) util:print\_r(event) if event.phase == "init" then coronaAds.show(bannerPlacement, false) end end print("Device Model = ", system.getInfo("model")) print("Platform Name = ", system.getInfo("platformName")) print("Platform Version = ", system.getInfo("platformVersion")) print("Corona Version = ", system.getInfo("version")) print("Corona Build = ", system.getInfo("build")) print("display.contentWidth", display.contentWidth) print("display.contentHeight", display.contentHeight) print("display.pixelWidth", display.pixelWidth) print("display.pixelHeight", display.pixelHeight) print("display.actualContentWidth", display.actualContentWidth) print("display.actualContentHeight", display.actualContentHeight) print("display.contentScaleX", display.contentScaleX) print("display.contentScaleY", display.contentScaleY) print("display.screenOriginX", display.screenOriginX) print("display.screenOriginY", display.screenOriginY) print("display.statusBarHeight", display.statusBarHeight) print("display.topStatusBarContentHeight", display.topStatusBarContentHeight) print("display.viewableContentHeight", display.viewableContentHeight) print("display.viewableContentWidth", display.viewableContentWidth) topDiff = (display.actualContentHeight - display.contentHeight) \* .5 local adSpace = display.newRect( 0, 0, 320, 50 ) adSpace.anchorX = .5 adSpace.anchorY = 1 adSpace.x = display.contentWidth \* .5 adSpace.y = display.actualContentHeight - topDiff adSpace:setFillColor( .5, .5, .5 ) local adText = display.newText( "320 x 50", 0, 0, native.systemFont, 14 ) adText.anchorX = .5 adText.anchorY = .5 adText.x = display.contentWidth \* .5 adText.y = display.actualContentHeight - topDiff - 40 adText:setTextColor( 1, 1, 1 ) print("initialize Corona Ads with key: ", coronaAdsKey) coronaAds.init( coronaAdsKey, coronaAdsListener ) CONFIG.LUA application = { content = { width = 320, height = 480, scale = "letterbox", fps = 30, }, } BUILD.SETTINGS settings = { build = { neverStripDebugInfo = true }, plugins = { ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["shared.android.support.v4"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, ["plugin.coronaAds"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } }, }, orientation = { default = "portrait", supported = { "portrait", } }, android = { usesPermissions = { "android.permission.INTERNET" }, }, iphone = { plist= { -- Whitelist Facebook Servers for Network Requests NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }, CFBundleDisplayName = "Crackerjack Baseball", NSLocationAlwaysUsageDescription = { "" }, NSLocationWhenInUseUsageDescription = { "" }, }, }, }
Here is the output for the above code for a Samsung Galaxy S4 Smartphone
Galaxy S4 screenshot here
I/Corona (15186): Device Model = SCH-I545
I/Corona (15186): Platform Name = Android
I/Corona (15186): Platform Version = 4.4.2
I/Corona (15186): Corona Version = 3.0.0
I/Corona (15186): Corona Build = 2016.2948
I/Corona (15186): display.contentWidth 320
I/Corona (15186): display.contentHeight 480
I/Corona (15186): display.pixelWidth 1080
I/Corona (15186): display.pixelHeight 1920
I/Corona (15186): display.actualContentWidth 320
I/Corona (15186): display.actualContentHeight 568.88891601562
I/Corona (15186): display.contentScaleX 0.29629629850388
I/Corona (15186): display.contentScaleY 0.29629629850388
I/Corona (15186): display.screenOriginX 0
I/Corona (15186): display.screenOriginY -44
I/Corona (15186): display.statusBarHeight 75
I/Corona (15186): display.topStatusBarContentHeight 22.22222328186
I/Corona (15186): display.viewableContentHeight 480
I/Corona (15186): display.viewableContentWidth 320
I/Corona (15186): initialize Corona Ads with key: 5223c2c3-cf81-4c43-ae41-2d4ed16552bc
I/Corona (15186): [Lua::RuntimeDispatchEvent()] WARNING: This function is deprecated. Use Lua::DispatchRuntimeEvent() instead.
I/Corona (15186): coronaAdsListener init
I/Corona (15186): print_r
I/Corona (15186): table: 0x7b709b88 {
I/Corona (15186): [provider] => “coronaAds”
I/Corona (15186): [name] => “adsRequest”
I/Corona (15186): [phase] => “init”
I/Corona (15186): }
I/Corona (15186): coronaAdsListener request
I/Corona (15186): print_r
I/Corona (15186): table: 0x7b839178 {
I/Corona (15186): [placementId] => “bottom-banner-320x50”
I/Corona (15186): [isError] => false
I/Corona (15186): [phase] => “request”
I/Corona (15186): [provider] => “coronaAds”
I/Corona (15186): [name] => “adsRequest”
I/Corona (15186): }
I/Corona (15186): coronaAdsListener found
I/Corona (15186): print_r
I/Corona (15186): table: 0x7b8c08d0 {
I/Corona (15186): [placementId] => “bottom-banner-320x50”
I/Corona (15186): [identifier] => “990039427ce2db0248f707fac9bdb7ad12d1a9609a396ac93715fe2133aa62df”
I/Corona (15186): [isError] => false
I/Corona (15186): [phase] => “found”
I/Corona (15186): [network] => “”
I/Corona (15186): [provider] => “coronaAds”
I/Corona (15186): [name] => “adsRequest”
I/Corona (15186): }
I/Corona (15186): coronaAdsListener shown
I/Corona (15186): print_r
I/Corona (15186): table: 0x7e8cb9b0 {
I/Corona (15186): [placementId] => “bottom-banner-320x50”
I/Corona (15186): [identifier] => “990039427ce2db0248f707fac9bdb7ad12d1a9609a396ac93715fe2133aa62df”
I/Corona (15186): [isError] => false
I/Corona (15186): [phase] => “shown”
I/Corona (15186): [network] => “”
I/Corona (15186): [provider] => “coronaAds”
I/Corona (15186): [name] => “adsRequest”
I/Corona (15186): }
Here is the output for the above code for a Samsung Galaxy Tab A Tablet
Galaxy Tab A screenshot here
09-27 16:54:50.379 21045 21070 I Corona : Device Model = SM-T550
09-27 16:54:50.379 21045 21070 I Corona : Platform Name = Android
09-27 16:54:50.379 21045 21070 I Corona : Platform Version = 6.0.1
09-27 16:54:50.379 21045 21070 I Corona : Corona Version = 3.0.0
09-27 16:54:50.379 21045 21070 I Corona : Corona Build = 2016.2948
09-27 16:54:50.379 21045 21070 I Corona : display.contentWidth 320
09-27 16:54:50.379 21045 21070 I Corona : display.contentHeight 480
09-27 16:54:50.379 21045 21070 I Corona : display.pixelWidth 768
09-27 16:54:50.379 21045 21070 I Corona : display.pixelHeight 1024
09-27 16:54:50.379 21045 21070 I Corona : display.actualContentWidth 360
09-27 16:54:50.379 21045 21070 I Corona : display.actualContentHeight 480
09-27 16:54:50.379 21045 21070 I Corona : display.contentScaleX 0.46875
09-27 16:54:50.379 21045 21070 I Corona : display.contentScaleY 0.46875
09-27 16:54:50.379 21045 21070 I Corona : display.screenOriginX -20
09-27 16:54:50.379 21045 21070 I Corona : display.screenOriginY -0
09-27 16:54:50.379 21045 21070 I Corona : display.statusBarHeight 24
09-27 16:54:50.389 21045 21070 I Corona : display.topStatusBarContentHeight 11.25
09-27 16:54:50.389 21045 21070 I Corona : display.viewableContentHeight 480
09-27 16:54:50.389 21045 21070 I Corona : display.viewableContentWidth 320
09-27 16:54:50.399 21045 21070 I Corona : initialize Corona Ads with key: 5223c2c3-cf81-4c43-ae41-2d4ed16552bc
09-27 16:54:50.439 21045 21070 I Corona : [Lua::RuntimeDispatchEvent()] WARNING: This function is deprecated. Use Lua::DispatchRuntimeEvent() instead.
09-27 16:54:52.149 21045 21070 I Corona : coronaAdsListener init
09-27 16:54:52.149 21045 21070 I Corona : print_r
09-27 16:54:52.159 21045 21070 I Corona : table: 0xb9405a80 {
09-27 16:54:52.159 21045 21070 I Corona : [provider] => “coronaAds”
09-27 16:54:52.159 21045 21070 I Corona : [name] => “adsRequest”
09-27 16:54:52.159 21045 21070 I Corona : [phase] => “init”
09-27 16:54:52.159 21045 21070 I Corona : }
09-27 16:54:52.459 21045 21070 I Corona : coronaAdsListener request
09-27 16:54:52.459 21045 21070 I Corona : print_r
09-27 16:54:52.459 21045 21070 I Corona : table: 0xb94f1220 {
09-27 16:54:52.459 21045 21070 I Corona : [placementId] => “bottom-banner-320x50”
09-27 16:54:52.459 21045 21070 I Corona : [isError] => false
09-27 16:54:52.459 21045 21070 I Corona : [phase] => “request”
09-27 16:54:52.459 21045 21070 I Corona : [provider] => “coronaAds”
09-27 16:54:52.459 21045 21070 I Corona : [name] => “adsRequest”
09-27 16:54:52.459 21045 21070 I Corona : }
09-27 16:54:55.609 21045 21070 I Corona : coronaAdsListener found
09-27 16:54:55.609 21045 21070 I Corona : print_r
09-27 16:54:55.609 21045 21070 I Corona : table: 0xb9720878 {
09-27 16:54:55.609 21045 21070 I Corona : [placementId] => “bottom-banner-320x50”
09-27 16:54:55.609 21045 21070 I Corona : [identifier] => “990039427ce2db0248f707fac9bdb7ad12d1a9609a396ac93715fe2133aa62df”
09-27 16:54:55.609 21045 21070 I Corona : [isError] => false
09-27 16:54:55.609 21045 21070 I Corona : [phase] => “found”
09-27 16:54:55.609 21045 21070 I Corona : [network] => “”
09-27 16:54:55.609 21045 21070 I Corona : [provider] => “coronaAds”
09-27 16:54:55.609 21045 21070 I Corona : [name] => “adsRequest”
09-27 16:54:55.609 21045 21070 I Corona : }
09-27 16:54:55.609 21045 21070 I Corona : coronaAdsListener shown
09-27 16:54:55.609 21045 21070 I Corona : print_r
09-27 16:54:55.609 21045 21070 I Corona : table: 0xb96f5dd0 {
09-27 16:54:55.609 21045 21070 I Corona : [placementId] => “bottom-banner-320x50”
09-27 16:54:55.609 21045 21070 I Corona : [identifier] => “990039427ce2db0248f707fac9bdb7ad12d1a9609a396ac93715fe2133aa62df”
09-27 16:54:55.609 21045 21070 I Corona : [isError] => false
09-27 16:54:55.609 21045 21070 I Corona : [phase] => “shown”
09-27 16:54:55.609 21045 21070 I Corona : [network] => “”
09-27 16:54:55.609 21045 21070 I Corona : [provider] => “coronaAds”
09-27 16:54:55.609 21045 21070 I Corona : [name] => “adsRequest”
09-27 16:54:55.609 21045 21070 I Corona : }