Reputation: 31
Is it possible to start an activity in the background? That is, instead of showing it in the front, I want it to start in the background and want it running "under" another Activity.
Is this possible?
Upvotes: 3
Views: 1026
Reputation: 2605
You can't start two activities simultaneously but what you can do is start the activity that you want in background 1st and inside the onCreate method of that activity call the foreground activity in such a way you can have desired activity at top and another one in background ready to be brought to foreground when required.
Your mainActivity---->open Activity1(supposed to be in background)-->Activity2(Activity2 comes FG while Activity1 goes in BG).
Upvotes: 0