Height of Android Navigation Bar

Is there a way to determine the height of the Android Navigation bar at the bottom as I am trying to place an advertisement banner (admob) at the bottom and it gets covered by the navigation bar?

Interested to know.  Anyone with an answer?

Have you looked at:

display.topStatusBarContentHeight?
 

http://docs.coronalabs.com/api/library/display/topStatusBarContentHeight.html

Hi Rob,

Doesn’t seem to work.  It does offset a little but part of it is still covered by the navigation bar and it varies from device to device.  I need this information to position my admob banner at the bottom of the screen without it being covered by the navigation bar.

Thanks.

Can you print out the value you are getting as well as the value for display.contentScaleY?

There was a forum discussion about this a few weeks ago and I think it has to do with what you’re using in your config.lua for scaling vs. the device’s physical scale. 

I am using the config.lua from the Ultimate Config.lua Tutorial.

And to show the admob banner, I am doing something like this.

ads.show( “banner”, { x=0, y=display.contentHeight - display.statusBarHeight } )

I think this link might help you…

http://stackoverflow.com/questions/14214222/discovering-the-true-screen-size-in-pixels-for-android-devices-which-have-a-so

Did you get the values printed out for the display.contentScaleY and display.topStatusBarContentHeight? 

display.statusBarHeight and display.topStatusBarContentHeight return different values.

Interested to know.  Anyone with an answer?

Have you looked at:

display.topStatusBarContentHeight?
 

http://docs.coronalabs.com/api/library/display/topStatusBarContentHeight.html

Hi Rob,

Doesn’t seem to work.  It does offset a little but part of it is still covered by the navigation bar and it varies from device to device.  I need this information to position my admob banner at the bottom of the screen without it being covered by the navigation bar.

Thanks.

Can you print out the value you are getting as well as the value for display.contentScaleY?

There was a forum discussion about this a few weeks ago and I think it has to do with what you’re using in your config.lua for scaling vs. the device’s physical scale. 

I am using the config.lua from the Ultimate Config.lua Tutorial.

And to show the admob banner, I am doing something like this.

ads.show( “banner”, { x=0, y=display.contentHeight - display.statusBarHeight } )

I think this link might help you…

http://stackoverflow.com/questions/14214222/discovering-the-true-screen-size-in-pixels-for-android-devices-which-have-a-so

Did you get the values printed out for the display.contentScaleY and display.topStatusBarContentHeight? 

display.statusBarHeight and display.topStatusBarContentHeight return different values.

I’m experiencing the same problem with android navigation buttons at the bottom of the screen.The exact height of this stuff is impossible to detect right. And now I found this topic, but still got no answers. Any clues how to deal with that damn bar height?