Android P Notch v3.17.2 misplacing banner

Android P Notch v3.17.2 misplacing banner
0

Hello, in v3.17.1 my game displays a black bar where the notch is on android devices and the banner appears below the black bar, but upgrading to v3.17.2 it now looks like this does anybody know what code was changed to cause this ? and any possible solutions to this to display my banner below the notch ? I couldn’t find any documentation on Android about this

@raydelto @mars3142 any thing you could think of ?

Does Director::getInstance()->getSafeAreaRect() not work for you?

2 Likes

I haven’t looked at that since Im implementing the banner in myActivity.java im not sure if i could somehow use it or if android has a way of setting views underneath the notch

Your code is for the cpp side. I believe the ad-banner is within the layout xml. So you can’t use the cpp code.

1 Like

do you know a possible solution, does android SDK have a way of detecting notch and place view directly below it ?

I think this issue should be fixed in Ad SDK.
Can you specify exact position of Ad?

You can get the insets within the SDK. An example can be seen in this medium article. I didn’t tested it by myself, so I can’t show you an testing project.

1 Like

The ad SDK needs just a container (layout) - the dev is responsible for placing it within the app layout, so you won’t get a fix from the ad provider.

1 Like

@dimon4eg this what the code looks like

Ok, so you can move layout down to fix the issue

2 Likes

Yes I am going to take a look at the article @mars3142 linked to