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", kbh); |
143 |
} |
} |
144 |
|
|
145 |
public static void removeMockLocation(Context cntx) { |
public static void removeMockLocation(Context cntx) { |