hide Notification - Android Android OS

Android examples for Android OS:Notification

Description

hide Notification

Demo Code


//package com.java2s;

import android.app.NotificationManager;

import android.content.Context;

public class Main {
    private static final int NOTIFICATION_ID = 1;

    public static void hideNotification(Context context) {
        NotificationManager notificationManager = (NotificationManager) context
                .getSystemService(Context.NOTIFICATION_SERVICE);
        notificationManager.cancel(NOTIFICATION_ID);
    }/* ww w  .j  a  v  a2  s .  c o  m*/
}

Related Tutorials