Skip to content

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

@zchirag50

Description

@zchirag50

Describe the bug
When using @capacitor-community/admob to display banner ads in the app, the ad banner overlaps the bottom my application navigation bar on Android 15/16 and above. The ad margin property set in the showBanner options is ignored or ineffective on these devices, causing the ad to cover UI elements.

To Reproduce
Steps to reproduce the behavior:

  1. Integrate @capacitor-community/admob plugin with a banner ad positioned at the bottom.
    2.. Set a margin value in the showBanner options (e.g. margin: 64).
  2. Run the app on an Android 16+ device.
  3. Observe that the banner overlaps the navigation bar and the margin is not applied.

Expected behavior
The banner ad should respect the specified margin, positioning itself above the navigation bar without overlap.

issue Screenshots
Image

Screenshots of Working correctly on android 12 version
Image

Smartphone (please complete the following information):

  • Device: [android version 16]
    -Capacitor version: ( @capacitor/android - version 7.4.3)
  • @capacitor-community/admob version 7.2.0

Additional context

  • I have tried this fix [https://github.com/Ad overlapping tabs #2] also but still it is not working.
  • The issue does not occur on older Android versions (e.g., Android 10 or 11).
  • Android 16 enforces edge-to-edge display with new window inset policies, which seem to interfere with native margin handling in the plugin.
  • The dynamic margin adjustment using banner size change events does not fully resolve the overlap on Android 16+.
  • Current workaround is to manually hide ads on Android 16+ until proper margin support is available.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions