Scree.height not giving proper resolution of android device when device has notch or navigation bar. Due to this there is offset at bottom of screen. So how to get proper height of device in unity and work with notch device. And how to hide navigation bar in android.
Screen.height returns the amount of pixels on the screen that are available to your app. In older versions of android the navigation bar would always remain static on the screen, eating a portion of it. This means that any app that runs does not have access on that portion of the screen. That is not an error, it's how the Android OS works, and in my opinion, it's the correct thing to do.
In newer versions, the navigation bar can get minimised if your app is set to run as fullscreen, which gives you access to the whole screen.
You also mention this causes a gap on the bottom of your screen. It's unclear why, unfortunately I can't give a solution to that unless you want to share some screenshots of what you mean.
Check this image. I have set Admob banner to bottom. But i show at bottom with some offset.