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.
一定のクライアント/サーバー通信に基づく私のアプリケーション。
サービスとアラームマネージャーを使用してそれをやろうとしています。
DataGramSocket を使用して特定のポートをリッスンし続けるために、onStartCommand() メソッドに while(true) ループを入れています。
私の問題は、バッテリーが消耗することです。
(プッシュ通知なしで) 一定の UDP リッスンを実装するより良い方法はありますか?
ありがとう