0

I am trying to make a simple timer application. I want the timer to run even after the user has navigated away from it, but when I run the application and try to come back to it restarts and the timer is no longer running if I do not come back to it in two minutes. Is there anyway to ensure that it will keep running forever without having to come back to the application every two minutes. If need by I can provide sample code or more explanation. Thank you.

Pillager225
  • 439
  • 1
  • 3
  • 15

2 Answers2

2

Service to work the same way as this.. please check out the underlying post from me. Activities and services using handlers

make sure that the service has the timer and calls a function like this. installed in the service so that the system can be have a look at the service and other examples this gives you a pretty goood example of the how the service works how the service binds,,,, and the functionality of the timer and implementation of it and so on.

Community
  • 1
  • 1
medampudi
  • 399
  • 3
  • 15
1

Think of creating the Service to solve your problem

Saurabh
  • 7,894
  • 2
  • 23
  • 31