@Override public void onDestroy() { Log.w(TAG, "Destroyed Location update Service"); toneGenerator.release(); unregisterActionReceiver(); cleanUp(); stopForeground(true); super.onDestroy(); }
@Override public boolean stopService(Intent intent) { Log.i(TAG, "- Received stop: " + intent); cleanUp(); if (config.isDebugging()) { Toast.makeText(this, "Background location tracking stopped", Toast.LENGTH_SHORT).show(); } return super.stopService(intent); // not needed??? }