コード例 #1
0
 @Override
 public void onDestroy() {
   Log.w(TAG, "Destroyed Location update Service");
   toneGenerator.release();
   unregisterActionReceiver();
   cleanUp();
   stopForeground(true);
   super.onDestroy();
 }
コード例 #2
0
 @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???
 }