Android Notification Remove removeNotification(Context context)

Here you can find the source of removeNotification(Context context)

Description

remove Notification

Declaration

public static void removeNotification(Context context) 

Method Source Code

//package com.java2s;
import android.app.*;
import android.content.Context;

public class Main {
    private static boolean alarmIsRunning = false;
    private static double currentDistance = -1;
    private static boolean alarmWentOff = false;

    public static void removeNotification(Context context) {
        NotificationManager notificationManager = (NotificationManager) context
                .getSystemService(Context.NOTIFICATION_SERVICE);
        notificationManager.cancelAll();
        alarmIsRunning = false;//w  ww .j av  a2s  .  c o m
        alarmWentOff = false;
        currentDistance = -1;
    }
}

Related

  1. cancel(Context context, String tag, int id)
  2. cancel(Context context, int id)