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 デバイスがアイドル モードになると、サービスから開始したスレッドは動作を停止し、接続を閉じたり、新しい接続を試行したりしません。
このようなものに使用する必要がある方法はありますか。
PowerManager.WakeLock を使用すると問題が解決しました。私は知っています、それはバッテリーの使用を殺しますが、私は長寿命のサービスを使用しなければなりませんでした.