update Notification - Android Android OS

Android examples for Android OS:Notification

Description

update Notification

Demo Code


//package com.java2s;
import android.app.Notification;
import android.app.NotificationManager;

import android.content.Context;

public class Main {
    public static void updateNotification(Context context, int id,
            Notification notification) {
        NotificationManager notificationManger = getNotificationManager(context);
        notificationManger.notify(id, notification);
    }/*from  w ww  .j  a v  a  2  s  . com*/

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

Related Tutorials