1 |
|
package com.loopback.androidapps.saveapp; |
2 |
|
|
3 |
|
import android.location.Location; |
4 |
|
import android.location.LocationListener; |
5 |
|
import android.os.Bundle; |
6 |
|
|
|
|
| 0% |
Uncovered Elements: 14 (14) |
Complexity: 7 |
Complexity Density: 1 |
|
7 |
|
public class MyLocationListener implements LocationListener { |
8 |
|
|
9 |
|
private String location; |
10 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
11 |
0
|
public MyLocationListener (){... |
12 |
0
|
location=null; |
13 |
|
} |
14 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
15 |
0
|
public void onLocationChanged(Location loc) {... |
16 |
|
|
17 |
0
|
loc.getLatitude(); |
18 |
0
|
loc.getLongitude(); |
19 |
0
|
String text = "My current location is: " + "Latitud = " |
20 |
|
+ loc.getLatitude() + "Longitud = " + loc.getLongitude(); |
21 |
0
|
setLocation(text); |
22 |
|
} |
23 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
24 |
0
|
public void onProviderDisabled(String provider){... |
25 |
|
} |
26 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
27 |
0
|
public void onProviderEnabled(String provider){... |
28 |
|
} |
29 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
30 |
0
|
public void onStatusChanged(String provider, int status, Bundle extras) {... |
31 |
|
|
32 |
|
|
33 |
|
} |
34 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
35 |
0
|
public void setLocation(String location) {... |
36 |
0
|
this.location = location; |
37 |
|
} |
38 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
39 |
0
|
public String getLocation() {... |
40 |
0
|
return location; |
41 |
|
} |
42 |
|
|
43 |
|
} |