1
I am tring to develop a project that connects to 

a comet server with long living connections. i do this job in a service. But when android device goes to idle mode, the thread i started from service stops working and do not close connections or try a new connection.

is there any method that i should use for this stuff.

Enes
  • 2,225
  • 1
  • 19
  • 16

1 Answers1

0

Using PowerManager.WakeLock solved my problem. I know, it kills baterry usage but, i had to use a long living service.

Enes
  • 2,225
  • 1
  • 19
  • 16