2013.12.9 Notification的flag

1,

通过为Notification的flag设置不同的值会有不同的效果

		notification.flags = Notification.FLAG_ONGOING_EVENT;
		notification.flags = Notification.FLAG_AUTO_CANCEL;
		notification.flags = Notification.FLAG_ONLY_ALERT_ONCE;

	NotificationManager mNotiMgr = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
	mNotiMgr.notify(1, notification); //发出id为1的通知
	mNotiMgr.cancel(1); //取消id = 1 的通知


2,

3,

4,

5,

你可能感兴趣的:(2013.12.9 Notification的flag)