Hello!
I’ve created a function that finds the height of an ad so it doesn’t cover game content.
I used jnihelper to call java functions.
public static int getAdViewHeightJni()
return AdSize.BANNER.getHeightInPixels (appActivity)
}
It returns 131 based on my phone and emulator.
However, this return value slightly exceeds the size of the ad like below.
The blue part is the height of the value returned by getAdViewHeightJni. The height of the red part is the correct height I want.
How can I get the correct height?
I hope it’s a way to find out when it’s first run. Getting the size of an ad when it is shown is cumbersome because it need to change the position of the game content to don’t overlap the ad when it is shown.