if (viaGps) {
locationManager.requestLocationUpdates(
LocationManager.GPS_PROVIDER, 0, 0, listener);
location = locationManager
.getLastKnownLocation(LocationManager.GPS_PROVIDER);
}
if (viaNetwork) {
locationManager.requestLocationUpdates(
LocationManager.NETWORK_PROVIDER, 0, 0, listener);
location = locationManager
.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
}
Log.d("", "lat: "+location.getLatitude()+" lon: "+location.getLongitude());
我想知道我的两个条件是否都是真的,那么下面的纬度和经度是从哪里来的?这些是来自gps
还是network_prvider
。locationManager
正在通过两者收听位置更新。在此先感谢