Android Question How to keep the timer going?

stingrae

Member
Licensed User
Longtime User
Hi,

I've searched this forum for over an hour, and I must be doing something wrong.

From what I understand, the Timer object should keep functioning when the app is in the background, except if it is disabled (for example in Activity Paused). Is this true?

I've attached a very small sample app, and it's not doing it. Once I press the home screen then the Timer Tick event doesn't fire. But once I bring it back to the front it keeps going.

How do I keep it going?

Thanks,
Rodney
 

Attachments

  • TimerTest.zip
    34.9 KB · Views: 216
  • Capture.PNG
    Capture.PNG
    17.1 KB · Views: 183

clarionero

Active Member
Licensed User
Longtime User
Hi,

I've searched this forum for over an hour, and I must be doing something wrong.

From what I understand, the Timer object should keep functioning when the app is in the background, except if it is disabled (for example in Activity Paused). Is this true?

I've attached a very small sample app, and it's not doing it. Once I press the home screen then the Timer Tick event doesn't fire. But once I bring it back to the front it keeps going.

How do I keep it going?

Thanks,
Rodney

Hi. In Android when an activity goes into the background all its processes stop, if you want to have something running in the background you must use a service.

Rubén
 
Upvote 0
Top