我已经实现了示例应用程序来获得通知。我想显示一个通知,当用户输入的时间和系统时间是相等的,那么通知应该出现,也出现在暂停像reminder.Here我已经使用了数字时钟,我可以看到数字时钟时间它是running.when的用户时间和系统时间是相等的通知是不显示。
我已经编写了如下代码
//This is for get the system time
DateFormat df = DateFormat.getTimeInstance();
systime = df.format(new Date());// system time formate is :HH:MM:SS
//thi is for user entered data
usertime="HH:MM:SS";
if(systime.equals(usertime))
{
notify(); //calling notify method to get the notification
} 当usertime和systime等于提醒时,它不会显示任何通知。
如何显示通知,systime和usertime是相等的,就像提醒通知一样?
请任何人帮助我
提前感谢
发布于 2011-06-17 15:00:08
您可能应该使用AlarmManager来安排通知。
https://stackoverflow.com/questions/6381528
复制相似问题