Commit e453036e authored by Schoumi's avatar Schoumi

Notifications des dons dans les deux semaines prochaines semaines

parent c524297e
......@@ -160,6 +160,7 @@ public class AlarmReceiver extends BroadcastReceiver {
cal.set(Calendar.MILLISECOND, 0);
cal.set(Calendar.SECOND, 0);
cal.set(Calendar.MINUTE, 0);
cal.set(Calendar.DAY_OF_YEAR,cal.get(Calendar.DAY_OF_YEAR)+14);
List<BloodSite> sites = Database.getInstance(context).getBloodSites(-1);
checkForProximity(sites, context);
checkForDate(sites, context);
......@@ -167,6 +168,7 @@ public class AlarmReceiver extends BroadcastReceiver {
List<Long> newNotifications = new ArrayList<Long>();
for(BloodSite site : sites)
{
if(site.getDate().compareTo(cal) < 0)
newNotifications.add(site.getDbId());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment