0

I have developed an app, in which I implemented notification service. & I fixed time interval for notification (For example, I get notification for some updates but the update validity (ie) expire time is 15 min and after that time interval if user opens the notification then it should not intent to next activity and notification needs to be canceled).

In my app while pushing notification I use to send message along with update end time. By using end time how to manage notification without intent to next activity if end time expires

  • Refer link : http://stackoverflow.com/questions/4994126/clearing-notification-after-a-few-seconds – VVB Nov 05 '14 at 05:08

1 Answers1

0

well if you do your coding and the end time is up, you call this..

NotificationManager notificationManager = (NotificationManager)Context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(id); // the notification id eg 34

are you okay?

Elltz
  • 10,730
  • 4
  • 31
  • 59
  • here i have to compare my current time and end time,if curent time is more than end time means notification needs to cancelled else it will intent to next activity – Mahadevappa T Nov 05 '14 at 05:27