Return back to the parent activity from subactivity
- by ZelluX
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