iPad banner shows in middle of screen

My inneractive banners are working on all my devices, but on iPad it is showing the banner smack dab in the middle of the screen when I want it centered on the bottom.

This is how I’m showing it:

screenMiddleX = display.contentWidth/2
screenBottom = display.contentHeight - display.screenOriginY
ads.show( “banner”, { x = screenMiddleX-160, y = screenBottom-50, interval = 45, testMode = false } )
Why would it work on every device and put it at the bottom of the screen, but on iPad it puts it right in the middle?
[import]uid: 84258 topic_id: 21991 reply_id: 321991[/import]

Same here. Did you find a solution? Somehow I think inneractive is not honoring the x and y coordinates…

One other thing is that on he iPad I always a get a question mark “?” banner. Do you see the same?

–wunderwuzzi [import]uid: 118947 topic_id: 21991 reply_id: 87709[/import]

Nope, no solution at all. I even have tried different inneractive ids that aren’t specified iPad and it does the same thing. However, I have not seen the question mark problem you are having.

Anyone have ideas? This is a dealbreaker for using inneractive. [import]uid: 84258 topic_id: 21991 reply_id: 87714[/import]

Yeah, very bad UI. I saw this and am trying it out now:
http://developer.anscamobile.com/forum/2012/02/09/banner-ipad-appers-middle-screen

Although the calcuations we are doing should exactly use that value, if I am not mistaken. So I am not sure if this will address he problem.

My biggest problem is testing, I don’t own an iPad and just found this out while having someone around the globe do some beta testing for me…

–wunderwuzzi [import]uid: 118947 topic_id: 21991 reply_id: 87716[/import]

You can always test in the iOS Simulator, it mimic this error for me without loading onto an iPad. I just tried using exact x, y values and still shows right in the middle of the screen. [import]uid: 84258 topic_id: 21991 reply_id: 87720[/import]

It worked for me now by specifying y = 702 (special casing for the iPad). I don’t think you need the testMode flag for inneractive. I think it has to do with the device scale (display.contentScaleY), and I am experimenting with that now to hopefully get it more generic.

I have never used the XCode simulator but that sure is a great idea. Do you have a pointer on how to get started with it? E.g how to deploy to?

–wunderwuzzi
[import]uid: 118947 topic_id: 21991 reply_id: 87723[/import]

What does your ad.show line look like? I tried y=702 and still stays in center.

I’m wondering if its because of my config settings:

width = 320,
height = 480,
scale = “letterbox”,

Would you mind posting yours?

As for using the iOS simulator, when you select to build for iOS, under the Build For dialog select Xcode Simulator. When it finishes building, it will automatically load the simulator and start your app.
[import]uid: 84258 topic_id: 21991 reply_id: 87726[/import]

Yes, config.lua has the same settings. Thanks for the tip with the simulator, that makes things a lot quicker!

I tried on the iPad Simulator and had the problem first that it still showed up in the middle, although that was until I realized hat the device model name is “iPad Simulator” compared to the real device’s “iPad”, so I had to adjust my special casing for that string. Now it works.

–wunderwuzzi

in main.lua
_DEVICE_MODEL = system.getInfo(“model”)

to display ad in game:
if _DEVICE_MODEL == “iPad” or _DEVICE_MODEL == “iPad Simulator” then
adY = 702 --690
adX = 142
–adY = (_H * _DEVICE_SCALE_Y - banner_height)
–adX = (_W * _DEVICE_SCALE_X - banner_width) * 0.5 --129
end

ads.show( “banner”, { x=adX,
y=adY, interval=adInterval } )

[import]uid: 118947 topic_id: 21991 reply_id: 87729[/import]

Bingo! That did it, thanks for the help!

This is pretty clearly a bug, every device handles the ads and scaling position correctly except for iPad. [import]uid: 84258 topic_id: 21991 reply_id: 87743[/import]

Great! To center it correctly x should be 129 (not 142), I think.

Yeah, when the iPad 3 comes out in a few weeks this probably won’t work anymore, is it will have different screen sizes. So a generic solution is much better. Anyway, for now it should do the trick.

–wunderwuzzi [import]uid: 118947 topic_id: 21991 reply_id: 87753[/import]

Having the same issue. I’m calculating the pixels in code tho, which works ok:

[code]

local pixelsX = (display.contentWidth - display.screenOriginX*2) / display.contentScaleX
local pixelsY = (display.contentHeight - display.screenOriginY*2) / display.contentScaleY
if model == “iPad” or model == “iPad Simulator” then
ads.show( “banner”, { x = (pixelsX - 766)/2,
y = pixelsY - 66, interval=30 } )
end
[/code] [import]uid: 8872 topic_id: 21991 reply_id: 88201[/import]