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? 爲什麼?