Android Open Source - AU-Shuttle-Tracker-App G P S Queue






From Project

Back to project page AU-Shuttle-Tracker-App.

License

The source code is released under:

GNU General Public License

If you think the Android project AU-Shuttle-Tracker-App listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package edu.american.student.util;
/* ww w.  j  a  v a  2  s.co  m*/
import java.util.ArrayList;

public class GPSQueue 
{
  private ArrayList<LatLonPoint> lastKnownBusLocations= new ArrayList<LatLonPoint>();
  
  public GPSQueue()
  {
    
  }
  public ArrayList<LatLonPoint >getLastKnownLocations()
  {
    ArrayList<LatLonPoint> toReturn = new ArrayList<LatLonPoint>();
    for(int i=0;i<lastKnownBusLocations.size();i++)
    {
      toReturn.add(lastKnownBusLocations.get(i));
    }
    lastKnownBusLocations.clear();
    return toReturn;
  }
  public void updateLocations(ArrayList<LatLonPoint> updatedList)
  {
    for(int i=0;i<updatedList.size();i++)
    {
      lastKnownBusLocations.add(updatedList.get(i));
    }
  }
  
}




Java Source Code List

edu.american.student.AUBusTrackerActivity.java
edu.american.student.BlueRoute.java
edu.american.student.Bus.java
edu.american.student.DotMapOverlay.java
edu.american.student.RedRoute.java
edu.american.student.RouteOverlay.java
edu.american.student.ShareRoute.java
edu.american.student.util.GPSQueue.java
edu.american.student.util.HTTPObject.java
edu.american.student.util.LatLonPair.java
edu.american.student.util.LatLonPoint.java