|
|
|
@ -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());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|