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

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

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

revision 255 by torben, Mon Aug 10 17:01:02 2009 UTC revision 256 by torben, Mon Aug 10 17:50:28 2009 UTC
# Line 126  public class StationLocator implements L Line 126  public class StationLocator implements L
126                  bjbro.setLatitude(56.380745);                  bjbro.setLatitude(56.380745);
127                  bjbro.setLongitude(9.655609);                  bjbro.setLongitude(9.655609);
128                                    
129                    Location hillerod = new Location("gps");
130                    hillerod.setLatitude(55.929177);
131                    hillerod.setLongitude(12.308095);
132                                    
133                  LocationManager lm = (LocationManager) cntx.getSystemService(Context.LOCATION_SERVICE);                  LocationManager lm = (LocationManager) cntx.getSystemService(Context.LOCATION_SERVICE);
134                  if (lm.getProvider("gps2") == null)                  if (lm.getProvider("gps2") == null)
135                          lm.addTestProvider("gps2", false, true, true, false, false, false, false, 0, Criteria.ACCURACY_FINE );                          lm.addTestProvider("gps2", false, true, true, false, false, false, false, 0, Criteria.ACCURACY_FINE );
136                  lm.setTestProviderEnabled("gps2", true);                  lm.setTestProviderEnabled("gps2", true);
137                  lm.setTestProviderLocation("gps2", kbh);                  lm.setTestProviderLocation("gps2", hillerod);
138          }          }
139                    
140          public static void removeMockLocation(Context cntx) {          public static void removeMockLocation(Context cntx) {

Legend:
Removed from v.255  
changed lines
  Added in v.256

  ViewVC Help
Powered by ViewVC 1.1.20