Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent, On AlarmPingSender

Solution 1:

Possible solution

Upgrade google analytics to firebase analaytics. Hope it'll solve your problems.Also upgrade all the library what're you using.

For me below solutions solve the problem.

Add PendingIntent.FLAG_IMMUTABLE to your pending intents.

Here is an example -

PendingIntent pendingIntent = PendingIntent.getActivity(this, alarmID, notificationIntent, PendingIntent.FLAG_IMMUTABLE);

For further information follow this link - https://developer.android.com/reference/android/app/PendingIntent#FLAG_IMMUTABLE

Solution 2:

After several attempt to fix this, i gave up and try to contact Qiscus. And they release new version that handle this Pending Intent behaviour change. So if anyone use Qiscus and got this error, you can use latest tag

https://github.com/qiscus/qiscus-sdk-android/releases/tag/1.3.35

Solution 3:

I had this crash but no 3rd party libraries. Adding this import with the latest version will fix the crash.

implementation 'androidx.work:work-runtime-ktx:2.7.0-beta01'