Note that your pending intents still may collide with this mysterious
request codes.
Since we have the source code now, it may be good to check if this is really
used or not, and how.

2008/11/20 Matthias <[EMAIL PROTECTED]>

>
> Guillaume,
>
> you're my hero. Thanks! Works like a champ now.
>
> Curse Google and their terrible documentation, I spent the whole day
> hunting down a bug that ain't there... great. Now I'll go home and
> bang my head at the wall for the rest of the day.
>
> On 20 Nov., 17:59, Guillaume Perrot <[EMAIL PROTECTED]> wrote:
> > I have this bug too, It works better when I put a requestCode in the
> > PendingIntent, but according to the documentation, this parameter is
> > not used...
> > Strange...
> > Even by doing that it sometimes fail, but without that, it surely
> > fails as you both noticed.
> > Here is the way I post my notification:
> >
> > Notification notification = new Notification
> > (R.drawable.public_post_icon,
> >       text, post.getPublishedDate().getTime());
> >     notification.flags = Notification.FLAG_AUTO_CANCEL;
> >     notification.setLatestEventInfo(mContext, authorDisplayName + " "
> >       + PUBLISHED_A_POST, text, PendingIntent.getActivity(mContext,
> >       mRequestCodeIncrementor++, postIntent, 0));
> >
> > I already filed a bug some months ago but no one at google read it...
> http://code.google.com/p/android/issues/detail?id=863
> >
> > On Nov 20, 5:38 pm, Matthias <[EMAIL PROTECTED]> wrote:
> >
> > > This gets weirder every minute.
> >
> > > Just out of curiosity I just called setIntent(null) in onPause() to
> > > make sure the Intent the Activity was started with is always reset. As
> > > soon as I start the Activity again though, getIntent() will AGAIN
> > > return the Intent I supposedly set to null before...... this Intent it
> > > returns even exists across re-deployments of the whole application
> > > (not across emulator reboots tho)!
> >
> > > Am I the only one having these problems? ^^ This whole thing looks
> > > completely broken to me. None of the functionalities I used exposed
> > > the behavior that was documented.
> >
> > > On 20 Nov., 17:03, Matthias <[EMAIL PROTECTED]> wrote:
> >
> > > > I think this may be a bug in Android. I also tried following the
> > > > instructions from the docs under section "Launch Modes and Launch
> > > > Flags" with no success. That section suggested to declare any
> Activity
> > > > launched from NotificationManager to set the taskAffinitity to "" and
> > > > finishOnTaskLaunch to true, so that the Activity does a clean start
> > > > everytime it is called.
> >
> > > > Even though the Activity is completely restarted now (onStart() is
> > > > called), getIntent() always yields the same intent, the one it was
> > > > started with for the very first time...
> >
> > > > On 20 Nov., 14:17, Matthias <[EMAIL PROTECTED]> wrote:
> >
> > > > > Hi,
> >
> > > > > I have the following problem: When posting a new Notification, I
> pass
> > > > > along a PendingIntent used to fire up an Activity that shows
> details
> > > > > about this Notification. These details are passed as a Serializable
> > > > > Extra.
> >
> > > > > However, the Intent holding the Extra is only updated once, when
> the
> > > > > Activity was started for the first time. If a new Notification
> arrives
> > > > > however, although I instantiate a new Intent, neither getIntent()
> nor
> > > > > onNewIntent() of said Activity deliver this new intent, instead
> they
> > > > > always deliver the Intent that was active when the Activity was
> > > > > started for the first time.
> >
> > > > > I tried combining many of the flags that can be passed to Intents
> and
> > > > > PendingIntents (in particular FLAG_ACTIVITY_SINGLE_TOP which is
> said
> > > > > to do exactly what I need, namely calling onNewIntent() with the
> new
> > > > > intent, but that's not the case), but no luck.
> >
> > > > > So, how can I update my Activity with the Intent used to fire it,
> > > > > whenever the Activity is already running?
> >
> > > > > Thanks,
> > > > > Matthias
> >
>

--~--~---------~--~----~------------~-------~--~----~
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