比如一个电话来时,您想要清空通知栏的通知,可用下面的方法
?
public enum Notification { CALL };NotificationManager mgr = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); mgr.cancel(Notification.CALL.hashCode());
?
或者您不想清空,而是更改Notification的图标或文字描述,可用下面的方法
?
mgr.notify(Notification.CALL.hashCode(),这里是Notification实例)
?
应用举例,如删除短信通知,更改连接通知等
1 楼 huangbq 2010-10-25
找清空通知栏的方法很长时间了,都没很好解决,原来这么简单,多谢fonter!