First activity A will be shown then it will go to activity B. I do not want to finish activity A until some task on activity B has finished successfully.
If task is successful then I want activity to go away so that if user presses back button he goes to parent of activity A. There is another button on activity B that launches another activity A.
If the task has failed user can go back to activity A by pressing back button. (I think in this case activity B will automatically be finshed by android).
As per the link I am following, context of Activity A will be static and remain same even if it gets finished for the first time. But I doubt it will work correctly in my case if its not same when ever a new instance of it is created. Does activity's context remain same for multiple instances?