Sunday, June 5, 2011

[android-developers] startActivityForResult does not return control to calling Activity

i have a tab layout. in one of the Activity's corresponding to a tab,
i use "startActivityForResult" to launch another activity to do
something. Once the tasks in the new activity are done, i invoke the
"finish()" method to return to the tab Activity which launched it.

strangely enough, when the new activity is finished, instead of
showing the tab activity which launched it, the entire app simply
exits. in the tab activity class i've overriden the "onActivityResult"
method, and have a log statement right at the start. This log
statement does not get printed.

so the gist of the problem is that when i launch an activity for
result, and then finish it, the control does not return back to the
activity which launched the other one - instead the app exits.

is there some elementary mistake that i'm making here?
thanks for your time.

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