On Tue, Nov 23, 2010 at 9:27 AM, oriharel <[email protected]> wrote:
> I set an PendingIntent on a Notification
> (notification.setLatestEventInfo). this intent is actually the same
> intent used to launch my app, only with a flag that I put in the extra
> (intent.putExtra(TAB_INDEX_PARAM_NAME, UPDATES_TAB_INDEX)).
>
> So my first activity launches, it queries it's intent's extras and
> immediately navigates to an Alerts activity rather the normal activity
> on a regular launch.
>
> The problem:
> from this point, every activation of my app navigates to this Alerts
> activity. when debugged, I find that the flag is "stuck" in the intent
> even though I removed/changed it. it just won't change.
>
> do you know how can change an extra on a giving Intent?

If you wish to modify the extras associated with an Intent in a
PendingIntent, you do so by passing FLAG_UPDATE _CURRENT or
FLAG_CANCEL_CURRENT to the getActivity() call on the PendingIntent
class. Otherwise, even though your Intent extras may change, Android
will ignore them and use the Intent already registered as a
PendingIntent.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to