Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I am tring to develop a project that connects to
具有长期连接的彗星服务器。我在服务中做这项工作。但是当 android 设备进入空闲模式时,我从服务启动的线程停止工作并且不会关闭连接或尝试新的连接。
有什么方法可以用于这些东西吗?
Using PowerManager.WakeLock solved my problem. I know, it kills baterry usage but, i had to use a long living service.