List of usage examples for android.app NotificationManager cancel
public void cancel(String tag, int id)
From source file:Main.java
public static void cancel(Context context, String tag, int id) { NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); nm.cancel(tag, id); }
From source file:org.chromium.chrome.browser.incognito.IncognitoNotificationManager.java
/** * Dismisses the incognito notification. *//*from w ww .j a v a 2 s.c o m*/ public static void dismissIncognitoNotification() { Context context = ContextUtils.getApplicationContext(); NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); nm.cancel(INCOGNITO_TABS_OPEN_TAG, INCOGNITO_TABS_OPEN_ID); }
From source file:org.chromium.chrome.browser.document.IncognitoNotificationManager.java
/** * Dismisses the incognito notification. *//* w w w . j a v a 2 s .c om*/ public static void dismissIncognitoNotification() { Context context = ApplicationStatus.getApplicationContext(); NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); nm.cancel(INCOGNITO_TABS_OPEN_TAG, INCOGNITO_TABS_OPEN_ID); }
From source file:fi.craplab.plugbuddy.PlugNotification.java
public static void cancel(final Context context) { final NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); nm.cancel(NOTIFICATION_TAG, 0); }
From source file:com.jameswolfeoliver.pigeon.Managers.NotificationsManager.java
public static void removeAllNotificationsForConversation(int threadId, Context context) { NotificationManager notificationManager = (NotificationManager) context .getSystemService(Context.NOTIFICATION_SERVICE); notificationManager.cancel(CONVERSATION_TAG, threadId); }
From source file:com.jameswolfeoliver.pigeon.Managers.NotificationsManager.java
public static void removeAllNotificationsForRemoteClient(Context context) { NotificationManager notificationManager = (NotificationManager) context .getSystemService(Context.NOTIFICATION_SERVICE); notificationManager.cancel(REMOTE_CLIENT_TAG, REMOTE_CLIENT_ID); }
From source file:inc.bait.jubilee.model.notification.NotificationBar.java
@TargetApi(Build.VERSION_CODES.ECLAIR) public static void cancel(final Context context) { final NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) { nm.cancel(NOTIFICATION_TAG, 0); } else {// w ww. j a va 2 s .c om nm.cancel(NOTIFICATION_TAG.hashCode()); } }
From source file:fr.simon.marquis.secretcodes.ui.CrawlerNotification.java
/** * Cancels any notifications of this type previously shown using * {@link #notify(Context, String, int)}. *//*from ww w .ja v a2s. co m*/ public static void cancel(final Context context) { final NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) { nm.cancel(NOTIFICATION_TAG, 0); } else { nm.cancel(NOTIFICATION_TAG.hashCode()); } }
From source file:com.juick.android.XMPPMessageReceiver.java
public static void cancelInfo(Context context) { NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); nm.cancel("", 2); }
From source file:com.baasbox.android.samples.aloa.receive.NewMessageNotification.java
/** * Cancels any notifications of this type previously shown using * {@link #notify(Context, String, int)}. *//* ww w . ja va 2 s . c o m*/ @TargetApi(Build.VERSION_CODES.ECLAIR) public static void cancel(final Context context) { final NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ECLAIR) { nm.cancel(NOTIFICATION_TAG, 0); } else { nm.cancel(NOTIFICATION_TAG.hashCode()); } }