private void cancelNotification(){
  final NotificationManager nm=(NotificationManager)getSystemService(NOTIFICATION_SERVICE);
  nm.cancel(NOTIFICATION_ID);
}

private void cancelNotification ( ) { final NotificationManager nm = ( NotificationManager ) getSystemService ( NOTIFICATION_SERVICE ) ; nm . cancel ( NOTIFICATION_ID ) ; }
cancels the existing notification . if there is no active notification this method does nothing
