1

I am currently trying to get our app working against SDK 31 / Android 12, but I'm running into an issue specifically with the cordova-plugin-marketingcloudsdk or MC-Cordova-Plugin. We are currently running the latest version of the plugin.

I can build the app successfully, and start the app up. We manage to get to the Splash screen before the app crashes. The adb logcat shows that it's caused by the following error:

--------- beginning of crash
04-12 13:43:19.527 12122 12236 E AndroidRuntime: FATAL EXCEPTION: pool-11-thread-1
04-12 13:43:19.527 12122 12236 E AndroidRuntime: Process: com.companyname.appname, PID: 12122
04-12 13:43:19.527 12122 12236 E AndroidRuntime: java.lang.IllegalArgumentException: com.companyname.appname: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
04-12 13:43:19.527 12122 12236 E AndroidRuntime: 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.
04-12 13:43:19.527 12122 12236 E AndroidRuntime:        at android.app.PendingIntent.checkFlags(PendingIntent.java:382)
04-12 13:43:19.527 12122 12236 E AndroidRuntime:        at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:673)
04-12 13:43:19.527 12122 12236 E AndroidRuntime:        at android.app.PendingIntent.getBroadcast(PendingIntent.java:660)
04-12 13:43:19.527 12122 12236 E AndroidRuntime:        at com.salesforce.marketingcloud.a.b.a(Unknown Source:10)
04-12 13:43:19.527 12122 12236 E AndroidRuntime:        at com.salesforce.marketingcloud.a.b.c(Unknown Source:40)
04-12 13:43:19.527 12122 12236 E AndroidRuntime:        at com.salesforce.marketingcloud.analytics.a.c$1.a(Unknown Source:83)
04-12 13:43:19.527 12122 12236 E AndroidRuntime:        at com.salesforce.marketingcloud.e.g.run(Unknown Source:17)
04-12 13:43:19.527 12122 12236 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
04-12 13:43:19.527 12122 12236 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
04-12 13:43:19.527 12122 12236 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:920)
04-12 13:43:19.530 12122 12276 E AndroidRuntime: FATAL EXCEPTION: pool-11-thread-2
04-12 13:43:19.530 12122 12276 E AndroidRuntime: Process: com.companyname.appname, PID: 12122
04-12 13:43:19.530 12122 12276 E AndroidRuntime: java.lang.IllegalArgumentException: com.companyname.appname: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
04-12 13:43:19.530 12122 12276 E AndroidRuntime: 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.
04-12 13:43:19.530 12122 12276 E AndroidRuntime:        at android.app.PendingIntent.checkFlags(PendingIntent.java:382)
04-12 13:43:19.530 12122 12276 E AndroidRuntime:        at android.app.PendingIntent.getBroadcastAsUser(PendingIntent.java:673)
04-12 13:43:19.530 12122 12276 E AndroidRuntime:        at android.app.PendingIntent.getBroadcast(PendingIntent.java:660)
04-12 13:43:19.530 12122 12276 E AndroidRuntime:        at com.salesforce.marketingcloud.a.b.a(Unknown Source:10)
04-12 13:43:19.530 12122 12276 E AndroidRuntime:        at com.salesforce.marketingcloud.a.b.c(Unknown Source:40)
04-12 13:43:19.530 12122 12276 E AndroidRuntime:        at com.salesforce.marketingcloud.analytics.c.c$2.a(Unknown Source:189)
04-12 13:43:19.530 12122 12276 E AndroidRuntime:        at com.salesforce.marketingcloud.e.g.run(Unknown Source:17)
04-12 13:43:19.530 12122 12276 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
04-12 13:43:19.530 12122 12276 E AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
04-12 13:43:19.530 12122 12276 E AndroidRuntime:        at java.lang.Thread.run(Thread.java:920)

I've tried having a look at StackExchange and other people seem to be reporting this issue with other plugins but not specifically with the cordova-plugin-marketingcloudsdk or MC-Cordova-Plugin.

Is there any provision on the way to fix/resolve this issue?

Thanks, bengrah

5
  • Android 12 support exists in the 8.x line of code currently and is not yet supported by our Cordova plugin (which requires 7.x of the SDK).
    – Bill Mote
    Commented Apr 12, 2022 at 13:30
  • @BillMote thanks for commenting - can you confirm a date time/ballpark date of when the plugin is due to be updated? Google have put on a dead drop date of 1st November to update existing apps - otherwise no further app updates will be accepted until the app in question targets SDK 31. Thanks.
    – bengrah
    Commented Apr 12, 2022 at 14:27
  • Please reach out through your account manager.
    – Bill Mote
    Commented Apr 12, 2022 at 14:34
  • Hi @BillMote - we've reached out to our account manager, but have said that fixing this isn't a priority at this time. I did see on another thread that there was a version released that supported Android 12 but was pulled due to another bug, but that was around 7 months ago - do you have an update on when the new version will be released?
    – bengrah
    Commented May 20, 2022 at 6:39
  • Sorry, we do not provide timelines or comment on roadmap work in these mediums. A voice of customer request is your best resource for ensuring your needs are documented.
    – Bill Mote
    Commented May 20, 2022 at 12:05

1 Answer 1

1

The MC Android Push SDK has been updated to support Android 12. This version can be used in both the Cordova and React plugins.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .