Code example for NotificationManager

Methods: cancelAll

0
    } 
 
    @Override 
    public void onDestroy() { 
        unregisterReceiver(mStateReceiver);
        mNotificationManager.cancelAll();
        // if (mPreferences.getBoolean(PREFERENCE_KEY_AUTO_REFRESH, false)) { 
        // Auto refresh enabled, so I will try to start service after it was 
        // stopped. 
        // startService(new Intent(INTENT_ACTION_SERVICE)); 
        // } 
        mIsRunning = false;
        super.onDestroy(); 
    } 
 
    public void shutdownService() { 
        // Auto refresh is enabled, so this service cannot be shut down. 
        /* 
         * if (mPreferences.getBoolean(PREFERENCE_KEY_AUTO_REFRESH, false)) 
         * return; if (!mAsyncTaskManager.hasActivatedTask()) { stopSelf(); } 
         * else { mShouldShutdown = true; }