2011-07-30 52 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); 
相关问题