AppOpenAd bug with targetSdkVersion 36 in landscape mode?

75 views
Skip to first unread message

netl...@gmail.com

unread,
Nov 15, 2025, 9:04:19 AMNov 15
to Google Mobile Ads SDK Developers
Hi, I'm trying to update my app to targetSdkVersion 36, but this seems to break many things, including AdMob ads - I am noticing the AppOpenAd gets cut out when displayed in landscape mode on the emulator running Android 16, but if I change it back to  targetSdkVersion 34, it is no longer cut out and displays properly. Attached screenshot how it looks like on Android 16 with targetSdkVersion 36.

Also, I noticed that the code for adaptive banners seems to be wrong and doesn't take in account if there is a navigation bar in the right of the screen in landscape mode, so the banner will be cut out/too large: https://developers.google.com/admob/android/banner/inline-adaptive

Shouldn't the code actually be like this?
int adWidth;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
WindowInsets windowInsets = activity.getWindow().getDecorView().getRootWindowInsets();
Insets insets = windowInsets.getInsets(WindowInsets.Type.systemBars() | WindowInsets.Type.displayCutout());
Rect rect = activity.getWindowManager().getCurrentWindowMetrics().getBounds();
adWidth = rect.width() - insets.left - insets.right;
} else {
adWidth = Resources.getSystem().getDisplayMetrics().widthPixels;
}
float density = Resources.getSystem().getDisplayMetrics().density;
adWidth = (int) (adWidth / density);
adView.setAdSize(AdSize.getCurrentOrientationAnchoredAdaptiveBannerAdSize(activity, adWidth));

What are we supposed to do? We can no longer release any updates if we don't target Android 16, but if we do, it breaks AdMob ads.

Thanks
AppOpenAd bug.png

Mobile Ads SDK Forum Advisor

unread,
Nov 17, 2025, 1:44:09 AMNov 17
to netl...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for contacting the Mobile Ads SDK Support team.

Starting with SDK version 24.0.0, the deprecated orientation-specific APIs for AppOpenAd have been removed. This means that App Open Ads no longer automatically adjust to orientation changes once the ad is loaded.
If your app supports multiple orientations and the user rotates the device while an App Open Ad is being displayed, the current ad instance will not resize or re-render to match the new orientation. This is expected behavior.
Recommended Implementation:

  • Load and show the App Open Ad in the current orientation.
  • If the orientation changes, and request a new App Open Ad suited for the new orientation.

This ensures the ad displays properly and meets design/layout requirements for both portrait and landscape modes.


Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-11-17 06:43:18Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vTbqY:ref" (ADR-00339422)



mikael diy

unread,
Nov 17, 2025, 4:03:16 AMNov 17
to Mobile Ads SDK Forum Advisor, netl...@gmail.com, google-adm...@googlegroups.com
Thanks. I have aleeady done the texts with a test ad and it works. The only thing I did was to then change to the actual prod ad account before publishing to google play. But I needed to see how it would act when I publish an app to play without yet approved ad, would it block the loading of the app and make it not work untill approved. Now it turns ut it alrrady is working so I will publish app now and ask for final spproval. 

But still If someone download app while waiting for approal the ad will Come up

--

---
You received this message because you are subscribed to the Google Groups "Google Mobile Ads SDK Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-admob-ads-sdk/NNJT8000000000000000000000000000000000000000000000T5UYO600gCZS88lnSzmFfry0L5aGJQ%40sfdc.net.

netl...@gmail.com

unread,
Nov 17, 2025, 7:31:39 AMNov 17
to Google Mobile Ads SDK Developers
Hi, the orientation doesn't change in this case, the AppOpenAd is loaded in the current orientation (landscape), and that's how it looks like, it is cut out and doesn't fit properly. As I said, this only happens only when I change the targetSdkVersion to 36.

I am using com.google.android.gms:play-services-ads-lite:24.6.0

Please test and check it out.

Thanks
AppOpenAd bug.png

Mobile Ads SDK Forum Advisor

unread,
Nov 17, 2025, 10:35:31 AMNov 17
to netl...@gmail.com, google-adm...@googlegroups.com

Hi,

I will raise this concern to the wider team, and will intimate once receive any update on this, meanwhile your patience is important.


Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-11-17 15:34:30Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vTbqY:ref" (ADR-00339422)



Reply all
Reply to author
Forward
0 new messages