How can I correctly pass unique extras to a pending intent?

Possibly two different issues here: 1) If you've already created your PendingIntent before and it "matches" an existing PendingIntent, then you must specify the PendingIntent. FLAG_UPDATE_CURRENT flag or it will not pass the extras. A "match" is based on the criteria that Intent.filterEquals() uses, so definitely read the docs there and make sure you understand the data, action, type, etc 2) I've read that if you do NOT set an action on your intent, then it will not propagate the extras, so perhaps try intent.

SetAction("com.blah. Action").

Possibly two different issues here: 1) If you've already created your PendingIntent before and it "matches" an existing PendingIntent, then you must specify the PendingIntent. FLAG_UPDATE_CURRENT flag or it will not pass the extras. A "match" is based on the criteria that Intent.filterEquals() uses, so definitely read the docs there and make sure you understand the data, action, type, etc.2) I've read that if you do NOT set an action on your intent, then it will not propagate the extras, so perhaps try intent.

SetAction("com.blah. Action").

In my pending intent I try to set the PendingIntent. FLAG_UPDATE_CURRENT, but now when the intent is called, I get an error like "java.lang. IllegalArgumentException: Can't use FLAG_RECEIVER_BOOT_UPGRADE here" - no idea though where this BOOT flag is coming from, all I added wa the FLAG_UPDATE_CURRENT.

Did you have similar issue before? (I'm on Huawei Ideos, 2.2) – Mathias Lin May 8 at 3:55.

I've run into a similar problem. Using PendingIntent. FLAG_ONE_SHOT may solve the problem, because it means the PendingActivity won't be reused.

This could be due to Activity::getIntent returning the Activity's original intent given certain intent flags/filters. If that is the case for you, you'll need to look at Activity::onNewIntent. Override that method, and the intent passed to that function should be the new intent with proper extras, etc.Credit goes to this SO question that helped me to solve my problem: Why is my searchable activity's Intent.getAction() null?

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions