Monday, August 8, 2011

[android-developers] Re: Intents

Exactly!

I am getting nulls when accessing the extras that I set from the
launching intent:

@Override
protected void onNewIntent(Intent intent){
// super.onNewIntent(intent);
setIntent(intent);
Log.v("NotifServImpl","######### =
"+intent.getExtras().getString("from"));
Bundle extras = intent.getExtras();
...

I was under the impression that setting the intent in this method
would guarantee that
i am working with the newest intent. Is this the right approach?

On Aug 8, 2:56 pm, Mark Murphy <mmur...@commonsware.com> wrote:
> On Mon, Aug 8, 2011 at 2:27 PM, kypriakos <demet...@ece.neu.edu> wrote:
> > Never mind - most likely missing the Override allows for anything ;)
>
> Bingo. @Override has no effect at runtime, but it's a compile-time
> sanity check. Rather useful, particularly for classes with lots of
> generics (e.g., AsyncTask).
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> Android 3.1 Programming Books:http://commonsware.com/books

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

No comments:

Post a Comment