2011-07-30 121 views

回答

1

你必須調用取消您的NotificationManager。取消方法的參數是應該取消通知的ID。 This是帶有取消方法的API。

UPDATE:

例如:

// Creates a notification 
private static final int MY_NOTIFICATION_ID= 1234; 
NotificationManager mNotificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE); 
mNotificationManager.notify(MY_NOTIFICATION_ID, notification); 

// Removes the notification from the notification bar 
mNotificationManager.cancel(MY_NOTIFICATION_ID); 
+0

你能舉一個例子嗎? –

+0

檢查更新的例子。 –

0

//通知管理器

_mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); 

//在登錄按鈕明確通知點擊

_mNotificationManager.cancel(notication_ID); 
相關問題