Return back to the parent activity from subactivity
Posted
by ZelluX
on Stack Overflow
See other posts from Stack Overflow
or by ZelluX
Published on 2010-06-14T03:10:12Z
Indexed on
2010/06/14
3:12 UTC
Read the original article
Hit count: 294
My application supports twitter and needs to open browser for OAuth. When the user clicks the Share on Twitter button, the main activity will create another subactivity (TwitterActivity) to handle twitter authentication issues.
Here is a flow graph showing how activities are invoked currently. Main is short for MainActivity and Twit for TwitterActivity.
startActivity() OAuth intent OAuth callback finish()
Main ---------------> Twit ------------> Browser --------------> Twit --------> Browser
As you may notice, after the TwitterActivity calls finish() to stop, it will now return back to MainActivity, but Browser instead. How can I make it return back to MainActivity? Many thanks
© Stack Overflow or respective owner