Godot-Android-Admob-Plugin icon indicating copy to clipboard operation
Godot-Android-Admob-Plugin copied to clipboard

Banner ads height?

Open mthnzbk opened this issue 4 years ago • 45 comments

Godot version: 3.2.2 AdMob Plugin version: latest Issue description: I posted the game, but the height of banner ads is still a problem for me. Isn't there a way to make it look thin like an FHD screen? https://ibb.co/d4mgkdq -> fhd+ or 720p https://ibb.co/BzCCtmd -> fhd

mthnzbk avatar Sep 03 '20 12:09 mthnzbk

I'm afraid that's it the way that adaptive banners works. Maybe you should avoid use banners on screens where it can override some controls.

Shin-NiL avatar Sep 04 '20 11:09 Shin-NiL

then I shouldn't use banner ads on the game screen. There is no other way then.

mthnzbk avatar Sep 05 '20 09:09 mthnzbk

@Shin-NiL I'm having this same issue for some users. I have never gotten one of these big banner ads on MY phone, but my friend (who has the same phone model as me) consistently gets them and only when using my app. I'm fairly certain it isn't an issue with adaptive banners because I've never seen an app with banner ads this tall. They are literally twice the size they should be; it is a serious impediment. According to the link on adaptive banners, it's supposed to make these ads take up a "more consistent portion of the screen across devices." That doesn't seem to be what's going on. This question raises a possible cause/solution.

Edit: if it is really just how adaptive banners are, what's the reason for using them? they are extremely ugly especially for game apps, which is the target audience for your otherwise great plugin. I think smart banners would be a better choice by far.

joshzegers avatar Sep 06 '20 07:09 joshzegers

I've changed from smart banner to adaptive for basically two reasons:

  1. Adaptive banner are supposed to replace the smart banner according with AdMob docs;
  2. @mthnzbk was having the same issue with smart banner before and we thought it was solved, until now.

I can try to change the plugin to let the user specify the banner size manually, maybe it's the best solution.

Shin-NiL avatar Sep 06 '20 14:09 Shin-NiL

I didn't have much trouble with the test ads. I started having this problem on my wife and my own phone when I switched to real ads. Most likely, those who play have the same problem if the fhd is not the screen.

mthnzbk avatar Sep 06 '20 15:09 mthnzbk

I have added the option to define the banner sizes, can you guys make a test?

GodotAdmobPlugin-4.1.0-pre.zip

Shin-NiL avatar Sep 06 '20 16:09 Shin-NiL

Man, that was a very helpful addition. Choosing banner size is a great enhancement. I was trying to build the whole source by myself for being able to achieve this. Now I am testing this new feature and will let you know the result

tolgakaranlik avatar Sep 06 '20 16:09 tolgakaranlik

As far as I can see, it works like charm. Keep up the good work man! I'll let you know if I find any bugs in my later usage

tolgakaranlik avatar Sep 06 '20 17:09 tolgakaranlik

@tolgakaranlik Nice! Thank you for testing, if everything goes fine it'll be included in the next release.

Shin-NiL avatar Sep 06 '20 17:09 Shin-NiL

thank you good job. unfortunately I couldnt be able to see a difference. and also reset button does not respond well

Peek 2020-09-07 20-29

EXAMPLE FIX: export(String, "ADAPTIVE_BANNER", "SMART_BANNER", "BANNER", "LARGE_BANNER", "MEDIUM_RECTANGLE", "FULL_BANNER", "LEADERBOARD") var banner_size = "ADAPTIVE_BANNER"

ulvido avatar Sep 07 '20 17:09 ulvido

unfortunately I couldnt be able to see a difference

Are you using the .aar and .gdap files from the version 4.1.0-pre of the plugin?

EXAMPLE FIX: export(String, "ADAPTIVE_BANNER", "SMART_BANNER", "BANNER", "LARGE_BANNER", "MEDIUM_RECTANGLE", "FULL_BANNER", "LEADERBOARD") var banner_size = "ADAPTIVE_BANNER"

Thank you @ulvido, I've just upload the fix.

Shin-NiL avatar Sep 07 '20 19:09 Shin-NiL

I thank you. first deleted the old ones and copied. also restarted the godot. ayway I get used to it now. I dont matter.

ulvido avatar Sep 07 '20 19:09 ulvido

The update is not working for me as it is intended. So I switched to smart banners and, on the affected phones, it continued to display 320x100 banners. Next I tried "BANNERS" which are supposed to be a constant 320x50, which resulted in NO ads being displayed at all, including interstitial ads -- I am getting an Invalid Parameter error. The error only arrives in release, no error when debugging. update: retried the "BANNERS" option and it once again didn't display ads, but this time produced no errors with logcat

joshzegers avatar Sep 09 '20 03:09 joshzegers

@joshzegers if it's working with the test mode and there's no error on release then I suspect that there's not much 320x50 ads to be served, maybe it's not a popular size. The publisher of the ad must distribute this size of banner to be served.

There's really no errors on logcat? If there was no ads to be served, as I suspected, then it should return error code 3.

Shin-NiL avatar Sep 09 '20 11:09 Shin-NiL

I think there are plenty of ads in that size because that is typically all I see on my phone, it's just some random users only get the big ones. So if nothing shows up, including interstitial, then something in the admob plugin broke. I'm still debugging... I'll update with more news.

joshzegers avatar Sep 09 '20 16:09 joshzegers

UPDATE: Having issues now just in general displaying normal ads in release. Test ads always show up no matter the banner size, no matter if debug or release. Real ads show in debug, NOT in release. Even smart_banners aren't working anymore. Part of the issue, I think, is problems with the signals. In the default admob.gd, it shows 12 signal connects that produce 12 errors if I leave them there, saying "signal X has already been connected to method Y" (in debug mode, but only if is_real is true. no errors if is_real is false in debug mode) and produced this error in release (with is_real of course being true): **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER E godot : At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID The connected methods seem to still be entered but only with the test ads (I had ads print whether the banner loaded or failed. Test ads printed that the banner loaded, while real ads printed nothing, not even the built-in outputs). If I comment out the signal connects, I am left with no errors, but the methods like _on_admob_ad_loaded() are never entered.

joshzegers avatar Sep 09 '20 18:09 joshzegers

Update 2: I upgraded the version of the google play services in the .gdap file which helped somewhat. The errors persist still when in release mode or when I have is_real enabled in debug mode. The only thing that has been fixed is that now logcat shows error code 3 for whenever I try to load an ad when is_real is true (both in debug and release). But what doesn't make sense is that this happens for even adaptive banners and interstitial ads, for which my admob account has plenty of inventory (I can even see these ads being filled in the current release of my app).

joshzegers avatar Sep 09 '20 18:09 joshzegers

@joshzegers are you using all files from the GodotAdmobPlugin-4.1.0-pre.zip package?

Shin-NiL avatar Sep 09 '20 19:09 Shin-NiL

yes

joshzegers avatar Sep 09 '20 19:09 joshzegers

@joshzegers was it working fine with v4.0.0?

Edit: are you testing your release binary after sign it with the production keystore?

Shin-NiL avatar Sep 09 '20 21:09 Shin-NiL

4.0.0 worked, yes. That's what I had been using for a while and it worked. This newest update has just had some weird effects. I'm doing both internal testing and final releases as well, but those take like two days for the review, so it's harder to test. Would internal test be different from play store release?

joshzegers avatar Sep 09 '20 23:09 joshzegers

Would internal test be different from play store release?

I really don't know, error code 3 can be caused for many, many different things. If you google search it you'll find various mismatched information.

Do you remember if you were able to display the real ads with debug build using plugin 4.0.0?

The only thing I've changed from 4.0.0 to 4.1.0 was a upgrade on the AdMob SDK.

Shin-NiL avatar Sep 10 '20 11:09 Shin-NiL

Well according to user10224828 at this StackOverflow post, you are able to get test ads but AdMob won't allow you to display real ads on your development environment. I know it was different in earlier versions but maybe they changed it in the last version. He seems pretty sure that you will be able to see those ads when the release distribution will be installed from Google Play. I will be trying it in a couple of days and will see the result. Sounds logical to me, I'll share the result here as soon as I see it

tolgakaranlik avatar Sep 10 '20 13:09 tolgakaranlik

It seems ads are working as intended when I compile my apk in release mode (without including debug information) and sign the app with my release key. But they don't work in debug mode (except test ads, there are no problems with the test ads). Most logical explanation here is that maybe the Google guys has blocked real ads display in debug mode.

tolgakaranlik avatar Sep 10 '20 17:09 tolgakaranlik

Thank you for reporting @tolgakaranlik, I hope it works fine for everyone.

Shin-NiL avatar Sep 10 '20 19:09 Shin-NiL

Internal test is not debug mode, but it's signed differently; I couldn't find info on it being an issue for ads. In 4.0.0 I didn't try to show real ads in debug mode. In this version I just tried it to help find my issue.

I can now report that adaptive banners, smart banners, and interstitial seem to be back to working order in my internal test, all I had to do was wait for whatever reason. However, the 12 errors still come up (they are just-for-show errors I guess and don't really hurt anything?). The issue of Smart banners displaying 320x100 ads is still a problem. I know this because I published using a test ad set to smart_banner and it said right on the ad that it was 320x100 even though the docs say nothing about smart_banners having that size of ad. I also tried BANNER and FULL_BANNER; neither displayed an ad and DID NOT print code 3 or anything like that -- nothing prints after the ad is requested. In the Stack Overflow question I linked in my first comment, they opted for this: android:layout_width="match_parent" android:layout_height="0dp" android:layout_weight="1" I think adding this would help since some of the 320x100 ads are actually more like 320x80 or 320x60 and fill in the rest with transparent pixels, but the layout makes it so that it centers it, putting half the transparent pixels below the ad. I've seen it many times in the affect users' phones.

UPDATE: I'm thinking that updating the version of GPS in the .gdap file may have fixed the issue with smart_banners showing 320x100 ads. Would be a much faster debug process if I was the one having the issues, but I've gotta wait for other people's feedback.

joshzegers avatar Sep 10 '20 19:09 joshzegers

the 12 errors still come up

What are these errors?

I'm thinking that updating the version of GPS in the .gdap file may have fixed

The GPS version on 4.1.0 is already upgraded to 19.3.0. I've coded this version of the plugin using 19.3.0 and it must match or you can get some strange behaviors.

I can't touch the layout configuration as it's defined on the engine, it's not created by me.

Shin-NiL avatar Sep 11 '20 11:09 Shin-NiL

The 12 errors I described:

In the default admob.gd, there are 12 signal connects that produce 12 errors if I leave them there, saying something like "signal X has already been connected to method Y" (in debug mode, but only if is_real is true. no errors if is_real is false in debug mode). In release (with is_real of course being true) I instead get the following error 12 times: **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER E godot : At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID

And when I downloaded the 4.1.0, I didn't change the dependencies in the gdap file because I had some stuff in there I didn't want to mess with. I previously had my GPS at 19.1.0. But it's fine now, no big deal.

joshzegers avatar Sep 11 '20 19:09 joshzegers

The 12 errors I described:

In the default admob.gd, there are 12 signal connects that produce 12 errors if I leave them there, saying something like "signal X has already been connected to method Y" (in debug mode, but only if is_real is true. no errors if is_real is false in debug mode). In release (with is_real of course being true) I instead get the following error 12 times: **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER E godot : At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID

And when I downloaded the 4.1.0, I didn't change the dependencies in the gdap file because I had some stuff in there I didn't want to mess with. I previously had my GPS at 19.1.0. But it's fine now, no big deal.

I have the same errors when updating to 3.2.3

09-19 16:15:55.373   934  1028 E godot   : **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   :    At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   : **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   :    At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   : **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   :    At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   : **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   :    At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   : **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   :    At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   : **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   :    At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   : **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   :    At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   : **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   :    At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   : **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   :    At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   : **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   :    At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   : **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   :    At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   : **ERROR**: Method failed. Returning: ERR_INVALID_PARAMETER
09-19 16:15:55.374   934  1028 E godot   :    At: core/object.cpp:1515:connect() - Method failed. Returning: ERR_INVALID_PARAMETER

on 3.2.2 this didn´t happened @Shin-NiL

martinpelli avatar Sep 19 '20 19:09 martinpelli

Another update: The smart banners were working for a short time and are now back to showing the big 320x100 ads on affected devices.

Also, I've been using Godot 3.2.2.

joshzegers avatar Sep 20 '20 07:09 joshzegers