On Fri, Mar 20, 2009 at 11:30 PM, havexz <bali.param...@gmail.com> wrote:

> I am also suffering from the same problem.What I think one should be
> able to call setResult till the last life cycle state "OnDestroy"


You can't because the previous activity has receive the result from you and
resumed itself long before your onDestroy() is called.

The result is sent to the system as part of the processing of finish().  It
needs to be set by then.  That's the way it is.

There really shouldn't be too much trouble with this.  When finish() is
called you KNOW you are finishing.  So if you haven't already done so,
figure out your result.  You can override finish() to call setResult()
before calling super.finish() if you want.

For ghod's sake, don't put a menu item or something to finish.  There is
just no need.  Do you see this anywhere in the standard Android UI?  No.
It's not needed.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

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