fix(banner): add WebView version check and safe area handling#428
Open
luisbytes wants to merge 2 commits intocapacitor-community:mainfrom
Open
fix(banner): add WebView version check and safe area handling#428luisbytes wants to merge 2 commits intocapacitor-community:mainfrom
luisbytes wants to merge 2 commits intocapacitor-community:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.