Incompatible with Android S (12)

1,874 views
Skip to first unread message

Michael Siejak

unread,
Feb 19, 2021, 8:42:03 AM2/19/21
to Google Mobile Ads SDK Developers
Immediate crash on launch when targeting snow cone or using the compatibility toggle PENDING_INTENT_EXPLICIT_MUTABILITY_REQUIRED

I've narrowed this problem down to the AdMob SDK by completely removing it from one of my apps. After I remove the SDK it works normally. This problem is affecting all of my apps on the latest SDK version.

https://developer.android.com/about/versions/12/reference/compat-framework-changes#pending_intent_explicit_mutability_required

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 19, 2021, 1:04:29 PM2/19/21
to msie...@gmail.com, google-adm...@googlegroups.com
Hi Michael,

Thank you for bringing this to our attention. Looking over this post as well as the PendingIntent. I would ask for you to share via "Reply to author" button a simple sample app showing the use of the SDK as well as the PendingIntent in it.

Although having looked at this document for PendingIntent. I do not believe you will be able to use the PendingIntent. As you are taking something from one app with the PendingIntent and then giving access to that something to another app. Which could cause policy violations. So on that side, I would suggest also contacting our Product Support Team .

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2CStzn:ref
Message has been deleted

Michael Siejak

unread,
Feb 19, 2021, 4:04:55 PM2/19/21
to Google Mobile Ads SDK Developers
Here is a sample app I created. 

Also, I think you misunderstood me. Somewhere in the sdk there is a PendingIntent without that flag, which is required on android 12. Since that flag is missing, just adding the SDK will immediately crash the app because the sdk is incompatiable with android S.
Thanks :)

java.lang.IllegalArgumentException: com.msiejak.lab.sccrash: Targeting S+ (version 10000 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
    Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.



Michael Siejak

unread,
Feb 19, 2021, 4:36:08 PM2/19/21
to Google Mobile Ads SDK Developers
I have comments and such in the app module's build.gradle file

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 21, 2021, 9:26:40 PM2/21/21
to msie...@gmail.com, google-adm...@googlegroups.com

Hi Michael,

Thank you for providing the requested details. That said, I'm afraid that we do not have access to the file that you've shared to us. Could you kindly provide access to the email "mobileads...@gmail.com" so that we can further investigate this issue?

Google Logo
Ziv Yves Sanchez
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2CStzn:ref

Michael Siejak

unread,
Feb 22, 2021, 9:38:26 AM2/22/21
to Mobile Ads SDK Forum Advisor Prod, google-adm...@googlegroups.com
Just shared it

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 22, 2021, 11:48:07 AM2/22/21
to msie...@gmail.com, google-adm...@googlegroups.com
Hi Michael,

Thank you for sending over the sample. I was able to open it. Looking over the file and looking more into Android SDK S/12. I was unable to run the code itself, as the simulators and everything we have is running on below 12. The fact that you have it set so high will be cause for a large amount of issues. That also being said, when looking at the app that you sent, it was basically empty, just including the start up code.

We would start by suggesting to lower the min SDK version down to anything other than 12 so as to allow more access. Also the fact that you are having issues with the PendingIntent flags, would seem to be an issue more with the Android SDK and not whatAdMob might be doing.

Also when I changed the versions to 29, and ran it. Also allowed for a lower min to run. Everything worked ok, which would seem to point to the SDK being too high at the moment. 

Regards,
Google Logo
William Pescherine
Mobile Ads SDK Team
 


ref:_00D1U1174p._5004Q2CStzn:ref

Blue Ocean

unread,
Apr 22, 2021, 5:59:28 AM4/22/21
to Google Mobile Ads SDK Developers
Hi,

Since 19.5.0, "com.google.android.gms:play-services-ads-lite:19.5.0" depend on "androidx.work:work-runtime:2.1.0".
It seems that "work-runtime:2.7.0-alpha02" fixes this problem.

Mobile Ads SDK Forum Advisor Prod

unread,
Apr 22, 2021, 1:22:33 PM4/22/21
to dev.pho...@gmail.com, google-adm...@googlegroups.com
Hi there,

Thank you for reporting where the issue comes from! I replicated this in an Android S emulator. After putting in app.gradle the following constraint our sample banner app works:
implementation 'com.google.android.gms:play-services-ads:19.5.0'
constraints {
    implementation('androidx.work:work-runtime:2.7.0-alpha02') {
        because 'previous versions have a bug impacting this application'
    }
}

I only tested it using gradle 6.8.1. This fix also works with our SDK version 20.0.0.

Let me bring up a request for documentation how to avoid this issue up with my team. You may monitor our release notes for an update.

Regards,

Google Logo
Aryeh Baker
Mobile Ads SDK Team
 

 



ref:_00D1U1174p._5004Q2CStzn:ref
Reply all
Reply to author
Forward
0 new messages