If you install the admob at the bottom of the screen in Unity, only the Andrdoid app will have a margin at the bottom.

Asked 2 years ago, Updated 2 years ago, 126 views

This is my first time making a game with Unity, but when I put the admob at the bottom of the screen (AdPosition.Bottom), it doesn't fit exactly at the bottom of the screen, creating a space equivalent to an action bar.
For iPhone, it will appear at the bottom of the screen.

When installed at the top of AdPosition.Top, there is no space and it will appear perfectly.

I searched for it, but I couldn't find anyone having trouble with the same phenomenon, so I'm having trouble knowing the cause.

Could someone tell me how to solve this problem?

android unity3d admob

2022-09-30 10:10

1 Answers

I'm reading the android library in unity, but in that library
Displaying banners in PopupWindow.
So if you condition this PopupWindow, it will disappear.

https://github.com/googleads/googleads-mobile-unity/blob/master/source/android-library/app/src/main/java/com/google/unity/ads/Banner.java
On line 205 of the ,

mPopupWindow.getContentView().setSystemUiVisibility(android.view.View.View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY|android.view.View.View.SYSTEM_UI_FLAG_FULLSCREEN|android.view.View.SYSTEM_FULLSCREEN;android.View.View.View.SYSTEM_FLAGION)

I think it will disappear if you add to the android project and change it to a library running unity and replace it with the original file.
I'm sorry if I'm wrong because I didn't actually move it.(In that case, I will correct it

)


2022-09-30 10:10

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.