How to close app without stoping chronometer???

I need to close my app from certain Layout that has a chronometer without stopping it, when the users gets to this Layout it starts the chronometer and if they click backbutton it closes the app, so when they opened again the app starts in this layout, but How do I get the chronometer still running while the app is closed???? This is my code in the Activity:

Chronometer chro;
chro = FindViewById(Resource.Id.chronometerLlegada);
chro.Start();

and in the backButton:

public override void OnBackPressed()
{
Java.Lang.JavaSystem.Exit(0);
}

Best Answer

Answers

  • Thank you Cheesebaron, I'm new at this and I did not know about Services, could you recommend me a tutorial, besides the ones on Xamarin page? what is the best way to use a Service??

Sign In or Register to comment.