1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
LocationManager locationManager = (LocationManager)this.getSystemService(Context.LOCATION_SERVICE);
LocationListener gpsListener = new LocationListener() {
@Override
public void onLocationChanged(Location location) {
double latitudeUser = location.getLatitude();
double longitudeUser = location.getLongitude();
}
@Override
public void onProviderDisabled(String arg0) {
}
@Override
public void onProviderEnabled(String arg0) {
}
@Override
public void onStatusChanged(String arg0, int arg1, Bundle arg2) {
}
}; |
Partager