Notifications des dons dans les deux semaines prochaines semaines
This commit is contained in:
parent
c524297eaa
commit
e453036e67
1 changed files with 2 additions and 0 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue