1
这是我的代码:如何获得通知,通知没有持续
Notification n = new Notification();
n.icon = R.drawable.ic_launcher;
n.tickerText="test";
n.defaults |= Notification.DEFAULT_ALL;
Intent dummyIntent = new Intent();
dummyIntent.setAction("dummy");
PendingIntent pi = PendingIntent.getBroadcast(c, 0, dummyIntent, 0);
n.setLatestEventInfo(c, "test","test", pi);
NotificationManager nm = (NotificationManager)c.getSystemService(Context.NOTIFICATION_SERVICE);
nm.notify(1, n);
我想把这个作为通知不是正在进行中。 但是这个通知被标示为onGoing? 为什么?