/[projects]/android/TrainInfo/src/dk/thoerup/traininfo/LocationLookup.java
ViewVC logotype

Diff of /android/TrainInfo/src/dk/thoerup/traininfo/LocationLookup.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 488 by torben, Thu Oct 29 13:42:57 2009 UTC revision 948 by torben, Fri Jul 2 14:58:44 2010 UTC
# Line 57  public class LocationLookup implements L Line 57  public class LocationLookup implements L
57                                  if (provider.equalsIgnoreCase("gps"))                                  if (provider.equalsIgnoreCase("gps"))
58                                          hasGps = true;                                          hasGps = true;
59                                  locManager.requestLocationUpdates(provider, 0, 0, this);                                  locManager.requestLocationUpdates(provider, 0, 0, this);
60                                                                    Location tmpLastKnown = locManager.getLastKnownLocation(provider);
61                                  saveLastKnownLocation(locManager.getLastKnownLocation(provider));                                  if (tmpLastKnown != null) {
62                                            saveLastKnownLocation(tmpLastKnown);
63                                    }
64                          }                          }
65                  } else {                  } else {
66                          // message that no suitable provider was found                          // message that no suitable provider was found
# Line 79  public class LocationLookup implements L Line 81  public class LocationLookup implements L
81                  if (hasGps) {                  if (hasGps) {
82                          if (!location.getProvider().equals("gps")) {                          if (!location.getProvider().equals("gps")) {
83                                  return; // at least give the gps a chance                                  return; // at least give the gps a chance
84                          } else if (location.getAccuracy() > 256) {                          } else if (location.getAccuracy() > 512) {
85                                  return; //if we have a gps provider lets wait for a more precise fix                                  return; //if we have a gps provider lets wait for a more precise fix
86                          }                          }
87    

Legend:
Removed from v.488  
changed lines
  Added in v.948

  ViewVC Help
Powered by ViewVC 1.1.20