Can't Put Extras For An Intent In Notification
I'm creating a notification from a Service that has an intent with an extra integer. For some reason, this isn't as easy as it seems. This is what I'm doing: Notification notificat
Solution 1:
You should try using PendingIntent.FLAG_UPDATE_CURRENT
when you call PendingIntent.getActivity
. From the documentation:
This can be used if you are creating intents where only the extras change, and don't care that any entities that received your previous PendingIntent will be able to launch it with your new extras even if they are not explicitly given to it.
I ran into this issue myself, and found the answer from a comment on this answer.
Post a Comment for "Can't Put Extras For An Intent In Notification"