0
我正在使用它来测试日期是否等于今天的日期。我的项目是从HTML解析一个如何计算多少个项目等于今天的日子?
while(postIt.hasNext)
它一直继续,直到没有剩下。
if(itemDate.contains(todaysDay)){
System.out.println(i);
nm = (NotificationManager) this.
getSystemService(Context.NOTIFICATION_SERVICE);
CharSequence from = "App";
CharSequence message = nameItem3 + "Today is the day!";
PendingIntent contentIntent = PendingIntent.getActivity(
this, 0, new Intent(this, HtmlparserExample.class), 0);
Notification notif = new Notification(R.drawable.icon,
nameOfItem + "Today is the day!!", System.currentTimeMillis());
notif.setLatestEventInfo(this, from, message, contentIntent);
nm.notify(1, notif);
}
我想要做的是测试是否有多个项目等于今天的日期。 如果是这样,我想要做的事情,如果是这样。
我该如何去跟踪今天的项目有多少?
我想要发生的事情是,当物品被检索到时,如果超过1个物品等于今天,它会显示不同的通知。
现在发生的事情是,它正在为每个与今天的日期相同的每个项目显示一个通知。
或者其他的工作是我可以显示每个通知?我怎么能这样做呢?
VS.它覆盖每一个,并显示一个新的?
你能提供你的意思代码的例子吗? – yoshi24
你能否提供一些指导你的意思的代码? – yoshi24
添加示例.. – nhaarman