[11.3] AdMob support for Android + EU Consent

Showcase your libraries, tools and other projects that help your fellow love users.
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:41 am
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.
I don't think LÖVE has ever done that, not even in 11.2 or previous. I think love.window.getSafeArea is intended mainly for fullscreen use, or maybe for more unusual cutouts in the screen, or other obstacles that are closer to the middle of the screen, that maybe get filled up even without fullscreen (?)
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 again! Just one more thing, portrait mode doesn't seem to work without having fullscreen enabled, or am I missing something?
KallioSanteri
Prole
Posts: 19
Joined: Tue Jan 14, 2020 5:04 pm

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

Post by KallioSanteri »

Yeah, it seems like the only option on how to get the app to portrait mode if you're not using fullscreen is to launch in fullscreen mode and then later in the code change it out of fullscreen. I don't know if this also has something to do with line 98?
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:56 am
I don't think LÖVE has ever done that, not even in 11.2 or previous. I think love.window.getSafeArea is intended mainly for fullscreen use, or maybe for more unusual cutouts in the screen, or other obstacles that are closer to the middle of the screen, that maybe get filled up even without fullscreen (?)
On iOS, the notch is filled even without fullscreen mode.
KallioSanteri wrote: Mon Mar 02, 2020 12:40 pm Hey again! Just one more thing, portrait mode doesn't seem to work without having fullscreen enabled, or am I missing something?
What do you mean?
I have apps in portrait which don't use fullscreen and work fine (https://play.google.com/store/apps/deta ... io.timeBar)
KallioSanteri wrote: Mon Mar 02, 2020 12:50 pm I don't know if this also has something to do with line 98?
May be, but I don't think so.
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 1:05 pm
KallioSanteri wrote: Mon Mar 02, 2020 9:56 am
I don't think LÖVE has ever done that, not even in 11.2 or previous. I think love.window.getSafeArea is intended mainly for fullscreen use, or maybe for more unusual cutouts in the screen, or other obstacles that are closer to the middle of the screen, that maybe get filled up even without fullscreen (?)
On iOS, the notch is filled even without fullscreen mode.
KallioSanteri wrote: Mon Mar 02, 2020 12:40 pm Hey again! Just one more thing, portrait mode doesn't seem to work without having fullscreen enabled, or am I missing something?
What do you mean?
I have apps in portrait which don't use fullscreen and work fine (https://play.google.com/store/apps/deta ... io.timeBar)
KallioSanteri wrote: Mon Mar 02, 2020 12:50 pm I don't know if this also has something to do with line 98?
May be, but I don't think so.
I don't know what's going on. I downloaded your Time Bar app to see what the non-fullscreen is like there. It's so different. When I make apps non-fullscreen, notch isn't filled + status bar is visible + Android 10 navigation bar is visible, and in fullscreen (when I get it to work), notch is filled, status bar is not visible, android navigation disappers (sometimes it stays until I re-enter the app).
Attachments
Screenshot_20200302-154104.png
Screenshot_20200302-154104.png (177.35 KiB) Viewed 28877 times
KallioSanteri
Prole
Posts: 19
Joined: Tue Jan 14, 2020 5:04 pm

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

Post by KallioSanteri »

Surprisingly, it was just a "me" problem, the way I had always done portrait was to edit AndroidManifest from landscape to portrait. Apparently that's not the real way... I don't even know how that had previously worked? Surely, I had tried apps without fullscreen on my phone before... Anyways, all good, except that I'd like to get the status bar transparent on top of the app, but I'll have to look into that a bit more. Cheers.
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 2:20 pm I'd like to get the status bar transparent on top of the app, but I'll have to look into that a bit more. Cheers.
Try to open SDLActivity.java and edit lines 276-279.
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 2:29 pm
KallioSanteri wrote: Mon Mar 02, 2020 2:20 pm I'd like to get the status bar transparent on top of the app, but I'll have to look into that a bit more. Cheers.
Try to open SDLActivity.java and edit lines 276-279.
"Uncomment to unhide status bar". I uncommented, and now the status bar is hidden... wtf... I was just going to play around with the themes in AndroidManifest, I got the status bar visible that way, but I couldn't edit it in any way.. I have no idea what's going on inside on these apps. This is getting frusturating. :D
KallioSanteri
Prole
Posts: 19
Joined: Tue Jan 14, 2020 5:04 pm

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

Post by KallioSanteri »

I got it perfected. I just have to remember in the future not to dive straight to the unknown, or at least do some research if things don't go as planned. It's all about picking a theme then editing it in two separate files, that way I got the icon-only status bar. Thank you again for the help!
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 3:34 pm "Uncomment to unhide status bar". I uncommented, and now the status bar is hidden... wtf... I was just going to play around with the themes in AndroidManifest, I got the status bar visible that way, but I couldn't edit it in any way.. I have no idea what's going on inside on these apps. This is getting frusturating. :D
If you uncomment line 98 of GameActivity and those lines of SDLActivity you restore the original LÖVE behaviour, therefore you should definitely see the status bar.
KallioSanteri wrote: Mon Mar 02, 2020 6:24 pm I got it perfected. I just have to remember in the future not to dive straight to the unknown, or at least do some research if things don't go as planned. It's all about picking a theme then editing it in two separate files, that way I got the icon-only status bar. Thank you again for the help!
I'm glad you did it :)
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests