/[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 288 by torben, Fri Aug 28 07:58:50 2009 UTC revision 289 by torben, Fri Aug 28 13:56:12 2009 UTC
# Line 129  public class StationLocator implements L Line 129  public class StationLocator implements L
129                  hillerod.setLatitude(55.929177);                  hillerod.setLatitude(55.929177);
130                  hillerod.setLongitude(12.308095);                  hillerod.setLongitude(12.308095);
131                                    
132                    Location aarhus = new Location("gps"); //Aros
133                    aarhus.setLatitude(56.153828);
134                    aarhus.setLongitude(10.200369);
135                    
136                    
137                    
138                  LocationManager lm = (LocationManager) cntx.getSystemService(Context.LOCATION_SERVICE);                  LocationManager lm = (LocationManager) cntx.getSystemService(Context.LOCATION_SERVICE);
139                  if (lm.getProvider("gps2") == null)                  if (lm.getProvider("gps2") == null)
140                          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 );
141                  lm.setTestProviderEnabled("gps2", true);                  lm.setTestProviderEnabled("gps2", true);
142                  lm.setTestProviderLocation("gps2", hillerod);                  lm.setTestProviderLocation("gps2", aarhus);
143          }          }
144                    
145          public static void removeMockLocation(Context cntx) {          public static void removeMockLocation(Context cntx) {

Legend:
Removed from v.288  
changed lines
  Added in v.289

  ViewVC Help
Powered by ViewVC 1.1.20