Skip to content

fix(banner): add WebView version check and safe area handling#428

Open
luisbytes wants to merge 2 commits intocapacitor-community:mainfrom
luisbytes:fix/safe-area
Open

fix(banner): add WebView version check and safe area handling#428
luisbytes wants to merge 2 commits intocapacitor-community:mainfrom
luisbytes:fix/safe-area

Conversation

@luisbytes
Copy link
Copy Markdown
Contributor

Fixes: #390

Based on this PR ionic-team/capacitor#8384

The Capacitor plugin in System Bar (included in the @capacitor/android package) in version 8.3.0 manages the safe area based on the WebView version (140+). ​​Historically, the safe area in the WebView never worked on Android until version 140, where it was patched. Also, based on this conversation ionic-team/capacitor#8424 (comment), I think the ideal solution would be to manage the banner's safe area based on the WebView version.

I tested the changes in this branch https://github.com/luisbytes/safe-area-admob/tree/patch/admob by patching the AdMob plugin with pnpm. I performed tests on Android 11, 14, 15, and 16 with WebView versions higher and lower than 140, and everything seems to work correctly. It might be good if someone could perform more tests, but I think this is better than the current solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Banner Ad Overlaps App's Navigation Bar and Margin Property Ignored on Android 15 & 16

1 participant