-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sending MMS is failing on Android 12 with target API as 31 #187
Comments
@NickM-27 Does it work when you set the target API to 30? |
@ravibpatel i was able to fix it on my local build by overwriting the transaction class. It's due to MUTABLE not being specified in the pending intents flags |
Could I know more detailed? |
@BareumSW You have to provide Mutability flag to all PendingIntent used in Transaction class as shown here. Just change it and other PendingIntent you find in Transaction class as shown below. BeforePendingIntent sentPI = PendingIntent.getBroadcast(
context, messageId, sentIntent, PendingIntent.FLAG_UPDATE_CURRENT); AfterPendingIntent sentPI = PendingIntent.getBroadcast(
context, messageId, sentIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE); It is required to provide mutability flag for PendingIntent if you are targeting Android 12 or above. It is mentioned in docs here. Prior to Android 12, a PendingIntent created without this flag was mutable by default. |
I updated my app to Android 12 and on an Android 12 device sending MMS fails
The text was updated successfully, but these errors were encountered: