【发布时间】:2011-10-04 21:23:16
【问题描述】:
private void triggerNotification(String s)
{
CharSequence title = "TASK";
CharSequence message = s;
notificationManager = (NotificationManager)c.getSystemService(Context.NOTIFICATION_SERVICE);
Notification notification = new Notification(R.drawable.vianetlogo, s, System.currentTimeMillis());
notification.defaults |= Notification.DEFAULT_SOUND;
notification.defaults |= Notification.DEFAULT_VIBRATE;
PendingIntent pendingIntent = PendingIntent.getActivity(c, 0, null, 0);
notification.setLatestEventInfo(c, title, message, pendingIntent);
notificationManager.notify(NOTIFICATION_ID, notification);
}
如果同时有多个通知,它会在状态栏中保存最后一个通知。有什么办法可以在状态栏上保存多个通知?
【问题讨论】:
标签: android