Example #1
0
 public List<Arrival> getNearestBuses(final Context ctx) throws Exception {
   List<Stop> stopList = BusInformation.getClosestStops(this.getDeviceLocation(ctx));
   List<Arrival> arrivalList = new ArrayList<Arrival>();
   for (int i = 0; i < stopList.size() && i < 5; i++) {
     arrivalList.addAll(BusInformation.getStopTimetable(stopList.get(i)));
   }
   Collections.sort(arrivalList, Arrival.compare_by_time);
   return arrivalList;
 }
Example #2
0
 public static List<Arrival> getBusTimetable(final Arrival arrival) {
   return BusInformation.getBusTimetable(arrival);
 }