私は次のようなブロードキャスト受信機からサービスを開始しています:
Intent serviceIntent = new Intent(context, BarometricLogger.class);
context.startService(serviceIntent);
作業が終了したら、cleanUp()メソッドを呼び出しています(これはサービスからのものです)。
private void cleanUp()
{
sensorManager.unregisterListener(sensorListener);
locationManager.removeUpdates(locationListener);
isLocationSet = false;
isClean = true;
this.stopSelf();
}
問題は、onDestroy()が呼び出されていないため、サービスが停止していないように見えることです。私は何が間違っているのですか?
BR