I'm building my first app, a game, but I'm having trouble with pause and resume.
The app is running, and then I press the home button or off button. From logging I can see that it calls Activity_Pause where I set the Timer1.enabled = false. This obviously stops the timer, and the app should pause with everything in the state that it is in.
However, a couple of seconds later, without me touching the phone (which is still off), I see that Activity_Resume is automatically called. This has the line Timer1.enabled = true. And so the the app starts again and continues working away in the background. But since the phone is off I don't want this. I want it to pause completely (whilst remembering everything), and the timer start again only when I go back to the app.
I think I'm probably missing something fairly fundamental here... is there something I need to do to stop the app running in the background? I thought that Activity_Resume would only be called when I went back to the app on the phone, not automatically straight after Activity_Pause.
Thanks for any help...
The app is running, and then I press the home button or off button. From logging I can see that it calls Activity_Pause where I set the Timer1.enabled = false. This obviously stops the timer, and the app should pause with everything in the state that it is in.
However, a couple of seconds later, without me touching the phone (which is still off), I see that Activity_Resume is automatically called. This has the line Timer1.enabled = true. And so the the app starts again and continues working away in the background. But since the phone is off I don't want this. I want it to pause completely (whilst remembering everything), and the timer start again only when I go back to the app.
I think I'm probably missing something fairly fundamental here... is there something I need to do to stop the app running in the background? I thought that Activity_Resume would only be called when I went back to the app on the phone, not automatically straight after Activity_Pause.
Thanks for any help...