admob positioning problem

Here is the updated table with 2 more phones added (1 is same as LG so actually there is one new):

bannerHeight.jpg

If there is a mathematical genius out there to find the formula for banner height, please help.

@ubj3d.android  I don’t have many Android devices to test with. It’s really great to see your table. Could you add “display.screenOriginX” to your table?

Your question:

HOW TO POSITION THE ADMOB BANNER AT THE BOTTOM IN  LANDSCAPE ?

Exactly my question too (Portrait as well).

Right now my solution is “NOT” to place any ad in Android devices because I don’t know how to place admob at the exact bottom. I am waiting for Corona response, but it seems they are very quiet on this issue and I don’t know why.

For me, there are many issues I don’t have exact answers for:

(1) How to determine exactly if a device is a tablet where taller ads are placed? juan.csdc created a feature request for this,

http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/5245292-implement-banner-height-as-api-call-for-the-ads-mo

I voted +3 too.

(2) To calculate the admob ad height (portrait), I use this formula (my configu.lua uses 320x480, letterbox)

if (tablet) then -- as stated in (1), it's a problem to determine for this tablet variable ret = (display.contentWidth-display.screenOriginX) / 800 \* 90 -- not sure 800 or 320 else ret = (display.contentWidth-display.screenOriginX) / 320 \* 50 end

a. should I use 800 or 320 in line 2? According to the smart banner document, it should be 800x90, but according to juan.csdc, he uses 320. And I don’t really have an Android tablet to test with.

b. When I test Sony Xperia, the admob ads are placed at the exact bottom perfectly. However for my Galaxy Tab, there are 3 pixels space between the ad and the bottom of the screen. I can see my background through this space, which is bad. I am not sure if it’s by design due to screen scaling or there is still something wrong with this formula.

c. Although you haven’t provided display.screenOriginX in your table, the ad heights you provided are far from the values that would be generated by this formula. So it’s now getting more confusing. (How do you calculate the ad heights in your table? By experiments, moving one pixel at a time?)

d. There is one more confusing thing. In order to place admob at the exact bottom for “Apple” devices, I use a different way to calculate the y value. Instead of 

adY = display.contentHeight - display.screenOriginY - bannerHeight

I have to use

adY = display.contentHeight - display.screenOriginY - display.screenOriginY

Sounds very strange? Yes, very strange, but this works for iPad 4, iPad air, iPhone 4S/5/5S. I don’t know why either.

It is driving me crazy too. 

With the ultimate config.lua, display.screenOriginX and display.screenOriginY are 0.

So the formula is very simple:

y = display.contentHeight  -  bannerHeight

To get the needed bannerHeight I used my parameters which I can change in “cloud” (my server), so no need to make a new APK every time, I just changed a parameter in my database on the server.

I moved the banner, pixel by pixel until perfect fit.

Your formula is not right, as you saw the Galaxy Tab has a “hole” if you put 50.

My contentWidth is twice as yours, hence 100 (96 for Galaxy Tab).

I have read and tried every solution suggested, none works.

Hopefully Corona stuff will help with this as this is really an ESSENTIAL feature - placing the banner at the bottom.

Will test with 2 more devices (a phone and a tablet) and add the results to the table.

Regards,

Damir.

Hi Damir,

Sure, I don’t like the formula either if it just fits my config.lua and doesn’t work for your case. And the 3-pixels hole is also a concern.

And if you have Apple devices, give it a try too, you should be more surprised about the inconsistency.

I also hope Corona can address this issue. I have been asking them here and there in different forum threads about the inconsistencies when placing ads (iad/admob) at the exact bottom in different iOS/Android devices, but no responses.

Consider iad/admob + iOS/Android + different config.lua, there are tons of test cases, and I haven’t found the consistency. Placing ad should be a high priority for Corona because it’s one of the main sources for developers to make some money. I really hope Corona can address this high priority + fundamental issue.

Hi Damir,

Did you misplace wrong column names for contentHeight & contentWidth in your table?

Corona staff should reply to this thread with detailed analysis and workaround. 

Hi Joe,

no, that is because the game is in landscape.

There is one more thing not implemented in Corona-AdMob - “normal” banners.

In my game “Ultimate BlackJack 3D” written in Java I use normal banner, it perfectly fits my screen design in landscape (bottom-right).

We made a similar, improved game in Corona “Ultimate BlackJack Reloaded” but unfortunately can’t have the same design due to the above problem + the smartbanner positioning problem.

I have to add, we have tried MANY MANY different ad networks (in Corona and native Java) and none can beat admob.

They all make great promises but in the end none of them could beat admob.

Getting FULL support for AdMob ads should be a high-priority for Corona, but I am afraid we will not get it.

Regards,
Damir.

Engineering is looking into the problem.

Rob

I hope we get some solution quite soon… We all depends on Admob as a devloper… 

Great to hear. Hopefully we have a solution soon.

Would be beautiful if we get “normal banner” support.

Smartbanners in landscape are only text-based and have lower CTR.

How soon would be oh say… now?

Simply position the Y at something really large like 10000 and it should auto-position to the bottom.  iAds does the same thing.  Since this is done through a plugin, it should be live ready to go.

Rob

Simply position the Y at something really large like 10000 and it should auto-position to the bottom.  iAds does the same thing.  Since this is done through a plugin, it should be live ready to go.

From my testing, admob does not do the same. It will go under the bottom of the screen for Android devices. Besides, I have been saying there is inconsistency for admob between Android & iOS devices (& inconsistency between iAd & admob). With the combinations of these 4 variables, I am totally lost when trying to put the ad at the bottom.

Unless there is some new update for the plugin for the last 10 days because I haven’t (or say gave up) tested them again since 10 days ago.

Besides, getting the correct ad height is also very important.

For example, I want to put an ad at the bottom of the screen and put a webView in the rest of the screen.

If I don’t know the exact ad height, I can’t calculate the exact height for the webView.

I think ad height issue has to be addressed after all.

The plugin was updated this afternoon.  Give it a try.

I tried admob with the Y value Rob suggested,

ads.show("banner", {x=display.screenOriginX, y=display.contentHeight + 10000 })

(1) iPad 4 & iPhone 5S: works!

(2) Galaxy Tab: works! (it used to have a 3-pixels hole. Now it’s placed at the exact bottom)

I think the problem should be solved. Damir can test more with other Android devices.

However, there is one more crucial problem for me. I need to get the height of the ad.

Without the exact height of the ad, how am I going to place a webView for the rest of the screen “seamlessly”? I hope Corona can address this issue too. Thanks.

That’s awesome Rob, thanks for your support on this topic, nevertheless as joe528 said, it is also important to know the banner height, so that we can arrange our UI for a perfect fit.

Thanks, first issue was solved pretty quick

Works on LG optimus pro and Nexus 7 (2013)

OK, I can confirm this works both portrait and landscape (tested on Transformer and Galaxy Tab tablets and Xperia and Nexus phones).

This is a great improvement, thank you for listening and fast response.

But as others already mentioned several times, we would also need to know the ad height (obviously to know where to position some graphics).

And please don’t forget “normal banners”.

Hopefully we would soon have full admob features.

Merry Christmas!

Merry Christmas… Have a great new year ahead… 

Hope everyone can vote on this admob feature:

http://feedback.coronalabs.com/forums/188732-corona-sdk-feature-requests-feedback/suggestions/5245292-implement-banner-height-as-api-call-for-the-ads-mo

in order to get the ad height so that the space left can be perfectly utilized.

I have been waiting for this feature to be implemented in order to show admob ad in Android devices. No revenue at all from my Android users. Corona please do put bugs/features related to ads with higher priority. It’s very important for some of the Corona developers I believe.