Skip to content

fix(android): safe area handling for Android 15+ - #379

Merged
distante merged 2 commits into
capacitor-community:masterfrom
luisbytes:safe-area
Oct 10, 2025
Merged

distante merged 2 commits into
capacitor-community:masterfrom
luisbytes:safe-area

Conversation

@luisbytes

@luisbytes luisbytes commented Oct 3, 2025 •

Copy link
Copy Markdown
Contributor

@distante This PR fixes an issue #362 generated in the prerelease version due to this commit fa4c1b5.

To avoid affecting previous versions, as discussed in the issue, I've added validation to only apply the safe area on Android 15+.

Screenshot 2025-10-02 at 11 17 43 PM

Please can we merge these changes and generate a new prerelease version?

@distante
distante requested a review from Copilot October 3, 2025 07:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes safe area handling for Android banner ads by restricting the window insets listener to only apply on Android 15+ (API level 35). This prevents issues that were introduced in a previous commit that affected earlier Android versions.

  • Added Android version check to conditionally apply safe area handling
  • Wrapped existing safe area code in Build.VERSION.SDK_INT check for VANILLA_ICE_CREAM (Android 15)
  • Added necessary import for Build class

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@distante

distante commented Oct 4, 2025

Copy link
Copy Markdown
Contributor

I would favorate #376 since it came first and handles more stuff?

@distante

distante commented Oct 4, 2025

Copy link
Copy Markdown
Contributor

That said I have nothing against this one, but I would really update the tests so we do not revert them by error.

@luisbytes

Copy link
Copy Markdown
Contributor Author

@distante The difference is that this PR really only applies the @rdlabo fix to Android 15+, while the other PR is a complete refactor of how the banner is displayed.

@distante

distante commented Oct 5, 2025

Copy link
Copy Markdown
Contributor

can you please rebase to check if the tests are still running?

@luisbytes

luisbytes commented Oct 5, 2025 •

Copy link
Copy Markdown
Contributor Author

@distante ready, could we launch the workflow?

@luisbytes
luisbytes requested a review from Copilot October 5, 2025 16:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@luisbytes

Copy link
Copy Markdown
Contributor Author

Hello @distante, all the checks were executed successfully. 🚀

@WMOH-DEV

WMOH-DEV commented Oct 9, 2025

Copy link
Copy Markdown

Im waiting for this merge, really it will fix a serious issue

@distante
distante merged commit 90dfa23 into capacitor-community:master Oct 10, 2025
5 checks passed
@distante

Copy link
Copy Markdown
Contributor

Thanks @luisbytes, Just a notice, for a relase we need to ping @rdlabo. I do not have release credentials.

@rdlabo

rdlabo commented Oct 25, 2025

Copy link
Copy Markdown
Member

Sorry for the wait. I've released it as 7.2.0!

https://github.com/capacitor-community/admob/releases/tag/v7.2.0

@luisbytes
luisbytes deleted the safe-area branch December 20, 2025 15:54
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.

5 participants