你好,我必须为每个约会(我插入约会细节) 设置一个闹钟,并且还显示约会的日期列表中的警报。 但如果我从列表中取消特定的约会,那么它不能报警,但对于所有的约会,它正在报警。如何取消预定任务
我如何取消任何特定的预约报警。
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 specified = calendar.getTime();
Timer timer = new Timer();
timer.schedule(new TimerTask() {
public void run() {
showNotification();
}
}, specifiedTime);
我已经使用timer.cancel();但它不能正常工作。 请帮忙... 在此先感谢
嗨,你知道吗,如果你赞扬有用的答案,它被视为表示赞赏的标志? – andreas 2011-09-26 21:55:22