googleads / googleads-mobile-unity

Official Unity Plugin for the Google Mobile Ads SDK
https://developers.google.com/admob/unity
Apache License 2.0
1.38k stars 1.08k forks source link

problem with AddPosition.Top on Android #794

Closed VincentBaillet closed 5 years ago

VincentBaillet commented 6 years ago

I've spent much time trying to display banners with adposition.top on Android device, and here is the result i get on all (3) my android devices: screenshot_20181028-123743-2 The banner does not appear at the top of the screen, but under what looks like the "status bar zone". Also, the banner is cut horizontally in the middle. It looks like issue #792, except that there is no notches on my phones.

I've tried to play with SetPosition(X,Y) in order to understand what's happening: it looks like the banner is always cut if the Y position is located within the "status bar".

2 questions: -Is there a way to display the Banner at the top of the screen, without being cut ? -I suppose this version of the plugin is a bit buggy on positionning banners. Is there an old version of the plugin that work on all banner positions and on all devices ?

Thanks. Vincent

asarazan commented 6 years ago

I'm also seeing this, but it only seems to manifest after the app resumes from background (e.g. the native share flow will trigger it).

My current hack is to wait for app resume, hide the banner, wait 1 second, and re-show the banner. Seems to work most of the time.

asarazan commented 6 years ago

One thing that might be relevant: I believe my Admob aar version has been forced to 17.0.0, due to Firebase's dependency requirements (this also caused an insta-crash, as Unity suddenly demanded that my app id be included in my AndroidManifest).

I suspect an incompatibility with the latest Admob aar may to be blame here.

asarazan commented 6 years ago

Here's a video of the repro in my app: https://photos.app.goo.gl/te4ueqvy4Fn9PCbx6

Interestingly, it didn't push down the banner this time, just the app contents. I have confirmed that the shifting goes away if and only if the banner is hidden/disabled.

VincentBaillet commented 6 years ago

thanks very much asarazan, i've tried to hide the banner and display it again, i also tried to follow your advice about the app resuming from background... I also removed and reinstalled all my packages, following step by step the instructions... and i still have the banner cut horizontally. Maybe my 3 android phones have a compatibility problem with admob, maybe there is a compatibility problem with other packages... Anyway, i can not solve this problem. I've spend too much time on this issue. So I've switched another banner provider, which worked within minutes.

itayganor commented 5 years ago

thanks very much asarazan, i've tried to hide the banner and display it again, i also tried to follow your advice about the app resuming from background... I also removed and reinstalled all my packages, following step by step the instructions... and i still have the banner cut horizontally. Maybe my 3 android phones have a compatibility problem with admob, maybe there is a compatibility problem with other packages... Anyway, i can not solve this problem. I've spend too much time on this issue. So I've switched another banner provider, which worked within minutes.

May you please name the other banner provider?

VincentBaillet commented 5 years ago

I've switched to MoPub. Not sure it's the best for monetising my app, but it technically works...

rampara commented 5 years ago

@VincentBaillet @itayganor @asarazan is this reproducible with the HelloWorld sample app included in this repo?

VincentBaillet commented 5 years ago

@rampara @itayganor @asarazan I've stopped trying some time ago, I've spent too much time on these banners that behaved differently on several devices. The best way I've found to display admob banners was to use another package and to use mediation for admob hope you will be able to solve this issue: it's a bit strange to use Mopub plugin to display admob ads.

stowy commented 5 years ago

Please try version 3.17.0.

UragayalaDeepika commented 5 years ago

@VincentBaillet @itayganor Can you please try with the latest verison of the plugin and let us know?

UragayalaDeepika commented 5 years ago

Closing this for now. Feel free to comment here so that we can reinvestigate this issue if it is still reproducible with the latest version.