Ejemplo n.º 1
0
  public void WriteEntry(Location location, int strength) {
    if (mClosing) return;

    mWriting = true;
    try {
      GPSCoordinate coord = new GPSCoordinate(location, strength);

      mCoords.add(coord);

      mWriter.append(coord.ToString() + ", " + strength + "\n");

      // Toast t = Toast.makeText(mContext, "Wrote log entry", Toast.LENGTH_SHORT);
      // t.show();
    } catch (Exception e) {
      ErrorFile.WriteException(e, mContext);
    }
    mWriting = false;
  }
Ejemplo n.º 2
0
 public float GetDistanceTravelled(GPSUnits units) {
   if (Size() < 2) return 0;
   GPSCoordinate first = mCoords.get(0);
   GPSCoordinate last = mCoords.get(Size() - 1);
   return GPSCoordinate.GetDistance(first, last, units);
 }