• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Detect that service was stopped/resumed by screen lock

dezo

Lurker
Hello guys, I'm coding a service which does a its job once in every 10 minutes. Works fine. However, when a screen lock gets activated, the service is stopped (which is normal I've found out and I'm find with that). But when the screeen is unlocked again, the 10-minute interval could be already over and I want the service to do the job immediatelly. But... how can I detect that the service was awaken? I schedule the tasks with handler.postAtTime() method. Thanks for answers!
 
By service, do you mean an actual Service subclass or a background thread (i.e. AsyncTask or Thread object)?
 
Back
Top Bottom