capacitor-community / capacitor-community/admob

Error calculating screen insets on Android 14 on pre-release version

Open
#362 6 comments 4 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
296
Forks
97
Avg merge
2d 6h
Merged PRs (30d)
7

Description

**Describe the bug**
This issue happens on the 7.1.0-1 pre-release
To reproduce you need to be in Android 14.
There's an incorrect calculation of the system screen insets. See the pictures attached.
¿Maybe the plugin changes the display mode of the app?

1. Create an emulator with Android 14
2. Create a banner ad on TOP_CENTER or BOTTOM_CENTER with margin: 0
3. See how the banner is incorrectly placed. (seems that the offsets are duplicated)

**Expected behavior**
The expected behavior is what happens on Androd 15 and above, where the insets are correct.

**Screenshots**
Image
Image
https://github.com/user-attachments/assets/ccef0a06-d046-416f-911a-934d4a430de7

**Smartphone (please complete the following information):**
- Device: Emulator Medium Phone Android Studio
- OS: Android 14
- Browser Chrome 137

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the banner placement problem in an Android 14 emulator using a TOP_CENTER or BOTTOM_CENTER banner with margin 0. Compare the calculated position and screen insets with Android 15, and consider the issue done when the banner is positioned correctly on Android 14 without duplicated offsets.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.