Problem with thread after SCREEN_OFF in Android

Posted by michael on Stack Overflow See other posts from Stack Overflow or by michael
Published on 2010-06-12T21:35:47Z Indexed on 2010/06/12 21:42 UTC
Read the original article Hit count: 166

Filed under:
|
|
|
|

I’m doing an application that listens to the android.intent.action.SCREEN_OFF in a Service (if that matter) and then it is supposed to wait a few seconds and launch an action, I’ve tried a timer schedule method, thread and handler postDelay method but all of them seems to fail, they are never executed on a device, it seems like it’s being freezed/killed after phone is locked. It works on emulator and on device attached to USB, but never with device working on battery only, which actually is a main scenario.

Do you know any solutions to this?

© Stack Overflow or respective owner

Related posts about android

Related posts about service