That's true. Do you do anything in onResume() to alter the data? And,
this might sound silly, but are you sure a String was stored where
getString is called? (For example, if you putExtra a bundle, then
getExtra returns a Bundle, not a string...)

Hope that helps.

-Jim

On Aug 9, 1:16 pm, kypriakos <[email protected]> wrote:
> Gotcha - but do you agree that the following should work and return
> the Extras bundle?
>
>     @Override
>         protected void onNewIntent(Intent intent){
>
>                 Bundle extras = intent.getExtras();
>                 ...
>
> Like Mark said, the intent var that is passed to the onNewIntent each
> time I start a new
> intent on a particular activity should hold a ref to that new intent
> and I should be able
> to access the data from it. No?
>
> On Aug 9, 1:26 pm, Jim <[email protected]> wrote:
>
>
>
>
>
>
>
> > Since setIntent() stores a reference to the intent sent to
> > onNewIntent(), you need to either capture the data there or copy the
> > Intent to a local variable and reference it. Once onNewIntent()
> > finishes, the Intent goes away and your reference is null.
>
> > Try that...
>
> > -Jim
>
> > On Aug 9, 10:46 am, kypriakos <[email protected]> wrote:
>
> > > > Blech.
>
> > > he he ;)
>
> > > > Use the Intent supplied to onNewIntent(). The Intent returned by
> > > > getIntent() will always be the original Intent used to create the
> > > > activity.
>
> > > But I am - and that's where the null exception occurs. Not sure if the
> > > setIntent or  the super are needed. I will poke around a bit more to
> > > see what is going on. But if the Intent supplied by the onNewIntent()
> > > is what I need then that puts me on the right path.
>
> > > Thanks again guys

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