[11.3] AdMob support for Android + EU Consent

Showcase your libraries, tools and other projects that help your fellow love users.
Donut-Dezz
Prole
Posts: 25
Joined: Sat Aug 03, 2019 11:56 am

Re: [11.2] AdMob support for Android + EU Consent

Post by Donut-Dezz »

Thanks for the help i got ads in my game. i got it working
bio1712
Citizen
Posts: 72
Joined: Wed Aug 19, 2015 4:13 pm
Location: Italy

Re: [11.3] AdMob support for Android + EU Consent

Post by bio1712 »

Updated to LÖVE 11.3.
I've made many changes, especially about the banner code.
I've also updated the AdMob SDK.
If you update from a previous version, you need to open your AndroidManifest.xml and set your AdMob app ID at line 81.

Edit: now the Consent SDK is localized (using https://github.com/santimar/googleads-c ... dk-android)
Last edited by bio1712 on Thu Feb 13, 2020 9:25 am, edited 1 time in total.
Nelvin
Party member
Posts: 124
Joined: Mon Sep 12, 2016 7:52 am
Location: Germany

Re: [11.3] AdMob support for Android + EU Consent

Post by Nelvin »

Haven't used it so far, but I hope I'll at some point. Thanks for the update.
KallioSanteri
Prole
Posts: 19
Joined: Tue Jan 14, 2020 5:04 pm

Re: [11.3] AdMob support for Android + EU Consent

Post by KallioSanteri »

Hey! Thank you for the amazing library. However, I have faced an issue. The fullscreen mode doesn't seem to fill the area on the side of a notch. It basically only fills the "safe area". In the non-forked version of 11.3, it's possible to fill the whole screen even if there is a notch. Has anyone found a fix to this, or has anyone else faced this issue?
bio1712
Citizen
Posts: 72
Joined: Wed Aug 19, 2015 4:13 pm
Location: Italy

Re: [11.3] AdMob support for Android + EU Consent

Post by bio1712 »

KallioSanteri wrote: Sun Mar 01, 2020 3:08 pm Hey! Thank you for the amazing library. However, I have faced an issue. The fullscreen mode doesn't seem to fill the area on the side of a notch. It basically only fills the "safe area". In the non-forked version of 11.3, it's possible to fill the whole screen even if there is a notch. Has anyone found a fix to this, or has anyone else faced this issue?
Hi
since I found an issue with LÖVE 11.3 (https://love2d.org/forums/viewtopic.php?f=4&t=88231) I’ve decided to remove that functionality.

Uncomment line 98 of GameActivity.java.
If you don’t use fullscreen, you may experience an unwanted behaviour with the banner, though.
KallioSanteri
Prole
Posts: 19
Joined: Tue Jan 14, 2020 5:04 pm

Re: [11.3] AdMob support for Android + EU Consent

Post by KallioSanteri »

bio1712 wrote: Sun Mar 01, 2020 4:35 pm
KallioSanteri wrote: Sun Mar 01, 2020 3:08 pm Hey! Thank you for the amazing library. However, I have faced an issue. The fullscreen mode doesn't seem to fill the area on the side of a notch. It basically only fills the "safe area". In the non-forked version of 11.3, it's possible to fill the whole screen even if there is a notch. Has anyone found a fix to this, or has anyone else faced this issue?
Hi
since I found an issue with LÖVE 11.3 (https://love2d.org/forums/viewtopic.php?f=4&t=88231) I’ve decided to remove that functionality.

Uncomment line 98 of GameActivity.java.
If you don’t use fullscreen, you may experience an unwanted behaviour with the banner, though.
Hey! Thanks for the fast reply. Sure enough, it worked, thanks! I don't know how the 'smart' banner behaves with this modification, but the normal banner seems to work just fine (320x50). Only thing about the banner that is slightly off is that a black line sometimes appears on top of the banner and the test ad message changes to indicate that it's 468x60 now. I can't notice a difference in the width of those banners tho. It could be an error in Google's test ads, and it doesn't really bother me at all. Changing the ad width and height is probably made on purpose, but it doesn't seem to work as Google has probably intended. Oh well, it doesn't really matter and the 'bug' appears anyways, whether I'm using fullscreen or not, and whether I've uncommented line 98 or not.
KallioSanteri
Prole
Posts: 19
Joined: Tue Jan 14, 2020 5:04 pm

Re: [11.3] AdMob support for Android + EU Consent

Post by KallioSanteri »

KallioSanteri wrote: Sun Mar 01, 2020 6:14 pm
bio1712 wrote: Sun Mar 01, 2020 4:35 pm
KallioSanteri wrote: Sun Mar 01, 2020 3:08 pm Hey! Thank you for the amazing library. However, I have faced an issue. The fullscreen mode doesn't seem to fill the area on the side of a notch. It basically only fills the "safe area". In the non-forked version of 11.3, it's possible to fill the whole screen even if there is a notch. Has anyone found a fix to this, or has anyone else faced this issue?
Hi
since I found an issue with LÖVE 11.3 (https://love2d.org/forums/viewtopic.php?f=4&t=88231) I’ve decided to remove that functionality.

Uncomment line 98 of GameActivity.java.
If you don’t use fullscreen, you may experience an unwanted behaviour with the banner, though.
Hey! Thanks for the fast reply. Sure enough, it worked, thanks! I don't know how the 'smart' banner behaves with this modification, but the normal banner seems to work just fine (320x50). Only thing about the banner that is slightly off is that a black line sometimes appears on top of the banner and the test ad message changes to indicate that it's 468x60 now. I can't notice a difference in the width of those banners tho. It could be an error in Google's test ads, and it doesn't really bother me at all. Changing the ad width and height is probably made on purpose, but it doesn't seem to work as Google has probably intended. Oh well, it doesn't really matter and the 'bug' appears anyways, whether I'm using fullscreen or not, and whether I've uncommented line 98 or not.
By the way, are you saying that this never worked on your end in the normal version of Löve 11.3 Android? I mean filling the notch and using safe area? I've had no issues with it before.
bio1712
Citizen
Posts: 72
Joined: Wed Aug 19, 2015 4:13 pm
Location: Italy

Re: [11.3] AdMob support for Android + EU Consent

Post by bio1712 »

KallioSanteri wrote: Sun Mar 01, 2020 6:14 pm
Hey! Thanks for the fast reply. Sure enough, it worked, thanks! I don't know how the 'smart' banner behaves with this modification, but the normal banner seems to work just fine (320x50). Only thing about the banner that is slightly off is that a black line sometimes appears on top of the banner and the test ad message changes to indicate that it's 468x60 now. I can't notice a difference in the width of those banners tho. It could be an error in Google's test ads, and it doesn't really bother me at all. Changing the ad width and height is probably made on purpose, but it doesn't seem to work as Google has probably intended. Oh well, it doesn't really matter and the 'bug' appears anyways, whether I'm using fullscreen or not, and whether I've uncommented line 98 or not.
I think it's a problem with test ads too. Are you still using the sample app ID or are you using your personal ad unit ID? You should be able to have real ads with the "test ad" label.
KallioSanteri wrote: Sun Mar 01, 2020 6:27 pm By the way, are you saying that this never worked on your end in the normal version of Löve 11.3 Android? I mean filling the notch and using safe area? I've had no issues with it before.
I think because you use fullscreen mode and I don't.
The issue with the banner, is that if you don't use fullscreen mode, when you open the app you get this screen:
Image

but when you create the banner, the screen changes and becomes like
Image

Therefore I've decided to comment line 98, to avoid this behaviour.


I think it's a Löve issue, because even if the app isn't in full screen mode, you should get the second image, while instead you get the first one.
KallioSanteri
Prole
Posts: 19
Joined: Tue Jan 14, 2020 5:04 pm

Re: [11.3] AdMob support for Android + EU Consent

Post by KallioSanteri »

bio1712 wrote: Mon Mar 02, 2020 9:19 am
KallioSanteri wrote: Sun Mar 01, 2020 6:14 pm
Hey! Thanks for the fast reply. Sure enough, it worked, thanks! I don't know how the 'smart' banner behaves with this modification, but the normal banner seems to work just fine (320x50). Only thing about the banner that is slightly off is that a black line sometimes appears on top of the banner and the test ad message changes to indicate that it's 468x60 now. I can't notice a difference in the width of those banners tho. It could be an error in Google's test ads, and it doesn't really bother me at all. Changing the ad width and height is probably made on purpose, but it doesn't seem to work as Google has probably intended. Oh well, it doesn't really matter and the 'bug' appears anyways, whether I'm using fullscreen or not, and whether I've uncommented line 98 or not.
I think it's a problem with test ads too. Are you still using the sample app ID or are you using your personal ad unit ID? You should be able to have real ads with the "test ad" label.
KallioSanteri wrote: Sun Mar 01, 2020 6:27 pm By the way, are you saying that this never worked on your end in the normal version of Löve 11.3 Android? I mean filling the notch and using safe area? I've had no issues with it before.
I think because you use fullscreen mode and I don't.
The issue with the banner, is that if you don't use fullscreen mode, when you open the app you get this screen:
Image

but when you create the banner, the screen changes and becomes like
Image

Therefore I've decided to comment line 98, to avoid this behaviour.


I think it's a Löve issue, because even if the app isn't in full screen mode, you should get the second image, while instead you get the first one.
I'm using the sample app ID, I don't have an Admob account yet. Isn't that black area on the left the area where the notch sits? Do you mean that the area should be filled even if the app is not in fullscreen mode? (Regardless of the banner)
bio1712
Citizen
Posts: 72
Joined: Wed Aug 19, 2015 4:13 pm
Location: Italy

Re: [11.3] AdMob support for Android + EU Consent

Post by bio1712 »

KallioSanteri wrote: Mon Mar 02, 2020 9:27 am
I'm using the sample app ID, I don't have an Admob account yet. Isn't that black area on the left the area where the notch sits? Do you mean that the area should be filled even if the app is not in fullscreen mode? (Regardless of the banner)
I think so, otherwise the function love.window.getSafeArea would be completely useless.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest