On Fri, Jan 4, 2013 at 4:51 PM, dashman <erjdri...@gmail.com> wrote:

> from the closing Activity, when and where should setResult() be called.
>

Before you call finish() on it.


> trying to send the result back to the activity waiting for
> startActivityForResult().
>

What is "the result"? Don't you just care that it was closed?


> I did it in onStop() - and it always returns RESULT_CANCELED
>

This will be the case if the user pressed back to back out.

It should suffice in your calling activity to know that a result was
returned, regardless of whether that was RESULT_CANCELED.
If you really want to set something else, you could override
onBackPressed() in the preference activity, set the result and call
finish() on the activity yourself.

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

-- 
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+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to