I want to run MainActivity with a new Intent in my other Activity . These two operations are in the same application, and the second action actually starts with MainActivity. So the scenario is as follows:
- MainActivity is created with the intention
- MainActivity launches SecondActivity (but MainActivity is not destroyed yet, it just stopped)
- SecondActivity launches MainActivity with a new Intent (SecondActivity does not close)
The MainActivity function is not marked. I mean, the launch mode of the Activity in the manifest is not set (so, by default).
I want to know what happens to the life cycle and intention of MainActivity.
Is activity restored? onCreate() called? Then called onCreate() twice, without onDestory() ? Or will a new MainActivity be created and there will be two MainActivities? Is the intent from getIntent() ?
I know that Activity.onNewIntent() is called for SingleTop Activities. Then in my situation onNewIntent() not called?
Thanks in advance.
source share