private void updateNotifs() { try { // GestionNotif. Calendar calendar = Calendar.getInstance(); int now = calendar.get(Calendar.HOUR_OF_DAY) * 60 + calendar.get(Calendar.MINUTE); notifSelect.setHeure(now); LOG_YBO.debug("Recherche des notif pour " + now); for (Notification notification : TransportsRennesApplication.getDataBaseHelper().select(notifSelect)) { createNotification(notification); } notifSelect.setHeure(now - 1); for (Notification notification : TransportsRennesApplication.getDataBaseHelper().select(notifSelect)) { createNotification(notification); } notifSelect.setHeure(now - 2); for (Notification notification : TransportsRennesApplication.getDataBaseHelper().select(notifSelect)) { createNotification(notification); } } catch (Exception ignore) { } }
private void updateNotifs() { try { // GestionNotif. Calendar calendar = Calendar.getInstance(); int now = calendar.get(Calendar.HOUR_OF_DAY) * 60 + calendar.get(Calendar.MINUTE); notifSelect.setHeure(now); LOG_YBO.debug("Recherche des notif pour " + now); for (Notification notification : TransportsBordeauxApplication.getDataBaseHelper().select(notifSelect)) { createNotification(notification); } notifSelect.setHeure(now - 1); for (Notification notification : TransportsBordeauxApplication.getDataBaseHelper().select(notifSelect)) { createNotification(notification); } notifSelect.setHeure(now - 2); for (Notification notification : TransportsBordeauxApplication.getDataBaseHelper().select(notifSelect)) { createNotification(notification); } } catch (Exception ignore) { } }
notification.setLigneId(ligneId); notification.setArretId(arretId); notification.setHeure(heureNotif); notification.setTempsAttente(minutes); notification.setDirection(favori.direction);