Go back to another or old Activity from a fragment in an activity
I have looked for this but, can't seem to find the answer that I need.
So, my scenario is, I have activityA that starts activityB using Intent. Then activityB sets up some values in a bundle and starts a fragment using fragment manager. Now, I want to go back to activityA when a button is click. I also want to pass some variables from the Fragment to activityA. How do I do this?
Currently, I just start just the activityA again by using intent with some bundle of data passed in from the fragment. This is not good, because I am restarting activityA again. I just want to go back like using OnResume() or something similar, so that my old data is still there in activityA again.