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.
アプリケーションが停止したときに gps をオフにする必要があります。gps はグローバルに使用され、すべてのアクティビティで使用されます。アプリが閉じられたときにイベントを取得するにはどうすればよいですか?
使用 使用 使用 使用 onPause で更新を削除する バッテリーの消耗を抑える
@Override protected void onPause() { super.onPause(); if(locationmanager != null) { locationmanager .removeUpdates(locationlistner); } locationlistner = null; }