Googleads-mobile-unity: AdMob Banner - Unity Plugin Position incorrect

Created on 6 Jun 2018  Â·  22Comments  Â·  Source: googleads/googleads-mobile-unity

Hi,
I have a bottom banner but incorrect position.
The banner position is above the bottom line (contain virtual key).
I use GoogleMobileAds v3.13.1, test device Asus zenphone 5, android version 8.0.0
Please see the screenshots in the attachment.
1527668281570

support question P2

All 22 comments

My banner ads were also jumping above software navigation bar (as soon as it was activated). Though enabling immersive mode helped me a lot. So banner was always under nav bar, Try it too.

Try to build unity project with Gradle build system, it works for me.

@rchallenger @muxapet both are not work for me.

@cowboybkit is this issue present for you on all devices with soft keys or just the Asus Zenphone 5?

@rampara : I also get same issue on Redmi 5 (Android 7.1.2). I use latest admob plugin version and Unity 5.6.5p2 (build with IL2CPP script backend instead Mono)
Please fix it. My app on Play store get many 1 star rating because this.
:(

@cowboybkit Mình dùng bản unity 2017.3.1f1 thì không bị lỗi này nữa, còn unity 2018 với unity 5.6 thì bị. Bạn thử xem sao.

@cowboybkit currently don't have access to a Redmi 5. Are you able to reproduce the issue with the latest version of the plugin on any other devices?

this bug show in HUAWEI nova 3e (ANE-AL00). I use GoogleMobileAds v3.15.0

This bug show in OnePlus6
I use lastest version plugin. Unity 2017.3.1f1

Attempting to get a hold of one of the devices mentioned to reproduce the issue. Will follow up when I have more information.

I have also this issue I'm oneplus6 and Wiko view 2. any news on this? Seems that you are correcting for a "safe area" (notch) but Unity is not.

We have the same issue on devices like Zenphone and OnePlus. Any news on this?

I'm facing same issue on Nexus6P. Banner position move up on soft keys appeared when interstitial shown. But sometimes the banner position not set back to bottom after the interstitial closed and soft keys disappeared.

Same problem on an Asus Zenphone 4 Max...

After some research, this problem is not related to the software navigation bar, but to the notch (display cutout). When using AdPosition.Bottom, the space between the banner and the bottom of the screen is the height of the notch. Currently I couldn't find any way to get the height of the notch, because with this measure the solution is easy:
new BannerView(adUnitId, adSize, 0, (int)ConvertPixelsToDP(Screen.height - adHeight + notchHeight));

I'm using OnePlus 6 but could successfully reproduce the issue on an emulated Pixel 2 and 2 XL with display cutout enabled from Developer Options.

@itayganor How you convert Pixels To DP. Please post code for ConvertPixelsToDP method

@Dharmesh1993

private float ConvertPixelsToDP(float pixels) {
    return pixels / (Screen.dpi / 160);
}

...Any updates?

This bug show in Nexus 5X
I use admob 3.15.0 version plugin.
Unity 2017.4.16
it display correct most of the time, but sometimes error jump above the bottom,and will auto correct the position in 30s

Any update on this case?

@daolm Please refer to this issue- https://github.com/googleads/googleads-mobile-unity/issues/734 if your concern is regarding the main issue reported here about the banner ad.

The only thing that worked for me is:
Project Settings > Resolution and Presentation > Render outside safe area

Was this page helpful?
0 / 5 - 0 ratings