I need to add a timer to control every 5, 10, 30 minutes.
The timer value is decided by another activity and then is called in the Widget Service.
How do I do this?
You can use a timer in the service. You should save the interval in a file and then load it in Service_Create.
However it is a bit more complicated as the process is expected to be killed from time to time. Therefore it will be better to use StartServiceAt and schedule the next run each time in Service_Start.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.