On Fri, Sep 23, 2011 at 3:27 PM, Streets Of Boston
<flyingdutc...@gmail.com>wrote:

> You can try this on the emulator. Hit Ctrl+F11 and you'll 'rotate' the
> device.


Yes, I saw the problem pop up with my onRestart() called when I wasn't
expecting it.

I can see the problem here with onRestart() being called when I didn't
expect it to (for all activities on
the activity stack?) when the screen is rotated. Thanks for pointing it out.
I can also see the emulator
bug whereby I have to relaunch my application to exit landscape mode and get
back to portrait mode.

setResult does not immediately return results back to its parent activity
> (You can call setResult many times: only the last call to setResult will be
> effective, superseding all previous calls)
>

This part is clear.


> The Intent you use when calling setResult will be the same Intent passed to
> the parent's implementation of onActivityResult later.
> Only when your child-activity finishes (call 'finish()' or the user hits
> the Back-key/button), then onActivtyResult will be called with same the
> Intent that was used by the last call to setResult.
>

What is not clear to me at this point from the documentation is:

1. if I don't pass an intent to setResult(), ie. use the one-parameter
version of setResult(), then will the null Intent be passed back to my
onActivityResult callback function?

2. Can I pass activity B's intent back to activity A by a call to setResult
and a call to finish() or do I have to create a new Intent in activity B
to pass back to activity A in my setResult?

Thanks,

John Goche

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