Suppose there are two activities A(Main Activity) and B . if we press a button on Activity A , Activity B starts , and if we press the back button on activity B , Activity A comes back . And if we then press Back button on Activity A screen , we comes out of the app .
I want to ask is there a way to keep the Main Activity Active . Like if we again open the app the on create method should not be called . And we return to the same state of the Main Activity as before pressing the back button.
For example in a Music Player app , when we press the back button from the app the app closes but the music still keeps playing and when we open the app again the music does not starts over again. means the onCreate method is not called again