Example usage for android.content Context NOTIFICATION_SERVICE

List of usage examples for android.content Context NOTIFICATION_SERVICE

Introduction

In this page you can find the example usage for android.content Context NOTIFICATION_SERVICE.

Prototype

String NOTIFICATION_SERVICE

To view the source code for android.content Context NOTIFICATION_SERVICE.

Click Source Link

Document

Use with #getSystemService(String) to retrieve a android.app.NotificationManager for informing the user of background events.

Usage

From source file:Main.java

public static void clearNotifications(Context context) {
    NotificationManager notificationManager = (NotificationManager) context
            .getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.cancelAll();/*from  w  w w.j  a  va 2s  . c om*/
}

From source file:Main.java

public static void clearNotifications(Context mContext) {
    NotificationManager notificationManager = (NotificationManager) mContext
            .getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.cancelAll();/*ww  w  .j ava 2  s  . c o  m*/
}

From source file:Main.java

public static void cancelNotification(Context ctx) {
    String ns = Context.NOTIFICATION_SERVICE;
    NotificationManager nMgr = (NotificationManager) ctx.getSystemService(ns);
    nMgr.cancel(NOTIFY_ID);//from   www.  j  a va2  s .c  o m
}

From source file:Main.java

public static void cancelNotifycation(Context context, int notifyID) {
    NotificationManager notifManager = (NotificationManager) context
            .getSystemService(Context.NOTIFICATION_SERVICE);
    notifManager.cancel(notifyID);/*from ww w. j av  a 2 s  .  c o  m*/
}

From source file:Main.java

public static NotificationManager getNotificationManager(Context context) {
    return (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
}

From source file:Main.java

public static void cancelNotification(Context context, int id) {
    NotificationManager notificationManager = (NotificationManager) context
            .getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.cancel(id);//from  w w w  . j  a  v  a2  s .  c  om
}

From source file:Main.java

public static void cancelNotification(Context context) {
    NotificationManager nMgr = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
    nMgr.cancel(REPLY_NOTIFY_ID);//from   ww  w  .java  2  s  . c o m
}

From source file:Main.java

public static void cancelNotification(Context context, int notificationId) {
    NotificationManager notificationManager = (NotificationManager) context
            .getSystemService(Context.NOTIFICATION_SERVICE);
    notificationManager.cancel(notificationId);
}

From source file:Main.java

public static void dismissNotification(Context context, int id) {
    NotificationManager manager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
    manager.cancel(id);//  ww w .  j  av a2s .c o  m
}

From source file:Main.java

public static void CancelNotification(Context context) {
    NotificationManager nMgr = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
    nMgr.cancelAll();/*ww w . j  a  v  a 2 s. c  om*/
}