android - how to cancel scheduled task -


hello have set 1 alarm every appointment(which insert appointment details) , show list of appointments on date alarm. if cancel particular appointment list must not alarm appointments being alarm .

how cancel specific alarm appointment.

calendar = calendar.getinstance();

        calendar.set(calendar.year, _year);         calendar.set(calendar.month, _month - 1);         calendar.set(calendar.date, _date);         calendar.set(calendar.hour_of_day, _hour1);         calendar.set(calendar.minute, _min1);         calendar.set(calendar.second, 0); 

date specifiedtime = calendar.gettime();

    timer timer = new timer();     timer.schedule(new timertask() {         public void run() {              shownotification();          }     }, specifiedtime); 

i have use timer.cancel(); won't work properly. please help... in advance

use indexing each appointment avoid problem through loop between appointments.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -