Open mablue opened 6 months ago
The error message indicates an issue with how your app is trying to create a PendingIntent
object on Android 14 (API level 34) and above. Here's a breakdown of the problem:
PendingIntent
object after its creation. However, it's considered a security risk.The problem:
Your app is trying to create a PendingIntent
with an implicit intent and the FLAG_MUTABLE
flag. This combination is no longer allowed on Android 14 (API level 34) for security reasons.
The solution:
There are two options depending on what you're trying to achieve:
Retrieve an existing PendingIntent: If you already have a PendingIntent
created earlier, use the FLAG_NO_CREATE
flag when calling getBroadcast
or getBroadcastAsUser
methods on the PendingIntent
object.
Create a new PendingIntent: If you need to create a new PendingIntent
with an implicit intent, use the FLAG_IMMUTABLE
flag instead of FLAG_MUTABLE
.
Additional tips:
https://paste.crdroid.net/HnhPZo