I want to close the notification by setAutoCancle()
method.
Here is code of NotifactionExample
.
@SuppressWarnings("deprecation")
protected void notifactionAlert() {
// TODO Auto-generated method stub
NotificationManager myNotifaction = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
@SuppressWarnings("deprecation")
Notification Notifaction = new Notification(R.drawable.notifaction,
"Notifaction received.", System.currentTimeMillis());
Intent notifactionIntent = new Intent(MainActivity.this, notify.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0,
notifactionIntent, 0);
Notifaction.setLatestEventInfo(MainActivity.this, "Notifaction.",
"you get a new notifaction...", pendingIntent);
myNotifaction.notify(9999, Notifaction);
}
What can I do?