Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Activity Lifecycle Android


I was wondering if someone could guide me in the right direction to properly implement the activity lifecycle. The following logic is what I am trying to achieve.


                                       |                                                             ^

OnCreateActivity1 -> RunActivity1 -> PauseActivity1 -> StartActivity2 -> Run Activity2 -> Finish Activity2

I have it all working accept when i try to recall activity1 from activity2 instead of going straight to the Run Activity it re creates the activity again. Is there away to go straight to the run cycle or does it need to be re created every time?

Thanks in advance.


  • ConorMurphyConorMurphy USMember ✭✭

    Ignore the lines ... I was trying to show the cycle. When i finishActivity2 I want to then run Activity1 again.

  • ConorMurphyConorMurphy USMember ✭✭

    Intent startActivity1 = new Intent (this, typeof(Activity1));
    resumeMainActivity.AddFlags (ActivityFlags.ReorderToFront);

    The above code brings the background Activity back into run without recreating the activity.

  • rzee7rzee7 INUniversity ✭✭✭✭✭

    Hey @ConorMurphy Thanks! for snippet :)

Sign In or Register to comment.