How to make Android Service run even when the device is not awake?

Posted by Deema on Stack Overflow See other posts from Stack Overflow or by Deema
Published on 2010-05-21T22:38:34Z Indexed on 2010/05/21 22:40 UTC
Read the original article Hit count: 197

Filed under:

hi

my application objective is to save location updates every ,let say, 20 minuets .

I used service and it worked fine , but when i lock the screen or it is locked automatically the service stop running . when i unlock it , service runs again.

highlight on my code:

Service xxx onCreat(){ call timer(); }

timer(){
   code
 }

How to make my code run all the time in all conditions?

© Stack Overflow or respective owner

Related posts about android-service