On Tue, Feb 16, 2010 at 5:35 PM, Cog <[email protected]> wrote:

> Can someone please explain why data is always null? Am I not using
> getIntent().putExtra() correctly?
>

Nope. getIntent() gets you the current activity's intent. You probably want
to create a new one, put in the information you want to pass back to the
calling activity, then call two argument version of setResult with the
intent 
(http://developer.android.com/intl/de/reference/android/app/Activity.html#setResult(int,
android.content.Intent)).

For example:

Intent result = new Intent();
... // Add stuff
setResult(RESULT_OK, result);
finish();

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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