开发者

Android service with long living HttpConnection

开发者 https://www.devze.com 2023-02-21 10:14 出处:网络
I am tring to develop a project that connects to a comet server with long living connections. i do this job in a service.
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 开发者_JAVA技巧working and do not close connections or try a new connection.

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号