Android Question opting out of edge-to-edge Admob

Douglas Farias

Expert
Licensed User
Longtime User
Hello everyone.

How can I disable Admob's edge-to-edge (interstitial) feature?


The app is already working fine without edge-to-edge.

I'm using it in manifest.
XML:
SetApplicationAttribute(android:theme, "@style/LightTheme")
CreateResource(values, theme.xml,
<resources>
    <style
        name="LightTheme" parent="@android:style/Theme.Material.Light">
       <item name="android:actionMenuTextAppearance">@style/LowerCaseMenu</item>
       <item name="android:windowOptOutEdgeToEdgeEnforcement">true</item>
    </style>
     <style name="LowerCaseMenu" parent="android:TextAppearance.Material.Widget.ActionBar.Menu">
        <item name="android:textAllCaps">false</item>
    </style>
</resources>
)



But Admob uses a separate activity for the interstitial.

How do I disable edge-to-edge interstitial Admob?

Note: The attached image shows an ad (interstitial) cut off at the bottom.

I need to set

XML:

for the interstitial admob.


thxx
 

Attachments

  • 3176ebe8-00a1-4c0a-8206-895c58d244a4.jpg
    3176ebe8-00a1-4c0a-8206-895c58d244a4.jpg
    81.8 KB · Views: 51

Computersmith64

Well-Known Member
Licensed User
Longtime User
Believe it or not, the AdMob SDK is not yet compatible with Edge to Edge. They are saying the compatibility update will be released "early September", but they've been setting & pushing back release dates for a while. Unbelievable that Google would allow a product that makes them $billions to be incompatible with Android 15+ devices. To make matters worse, I've heard of developers being penalised by AdMob because the ads don't display correctly...
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
EDIT: Actually, if I change my device to use 3 button navigation (vs gestures) the bottom bar does cover the ad, but when the ad is in a cancelable state, pressing the back button will close it.

Having said that, I'm not seeing the issue in any of my apps that I'm running on an Android 16 device. The apps themselves all have edge to edge enabled though.

Using ads v24.4.0
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
The apps themselves all have edge to edge enabled though.
Your Apps would not be accepted by Google if you actually not using opt out of edge-to-edge.

Remember that
Starting from B4A v13.4, the default themes (Themes.LightTheme / Themes.DarkTheme) already include the snippet that opts out of edge-edge. You only need this if you use a customize theme.

So you are probably using one of these Themes.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Your Apps would not be accepted by Google if you actually not using opt out of edge-to-edge.

Remember that
Starting from B4A v13.4, the default themes (Themes.LightTheme / Themes.DarkTheme) already include the snippet that opts out of edge-edge. You only need this if you use a customize theme.

So you are probably using one of these Themes.
You can't opt out if you're targeting Android 16. But regardless, these apps aren't written using B4A, so no they don't opt out.
 
Last edited:
Upvote 0

asales

Expert
Licensed User
Longtime User
There is a new version (24.6.0) of the Ads component in the SDK. No mention of this issue:
I updated this options in the B4A SDK:
- com.google.android.gms : play-services-ads
- com.google.android.gms : play-services-ads-api
Make sure that you have a backup of your original B4A SDK.
I made more test and got an error using a SDK install from stratch and update only the options above:
c:\android3\tools\..\extras\b4a_remote\androidx\datastore\datastore-core-android\1.1.7\unpacked-datastore-core-android-1.1.7\jars\classes.zip:classes.dex

Since I only have one tablet with Android 15, I tested it on an emulator.

Sometimes the issue occurs, sometimes it doesn't, as we can see in the screenshots.

Could someone test further and report back?

1757636735463.png
1757636745225.png
1757636766880.png
1757636784216.png
 
Last edited:
Upvote 0
Top