List<String> providers = locationManager.getProviders(true);
Location bestLocation = null;
for (String provider : providers) {
Location l = locationManager.getLastKnownLocation(provider);
if (l == null) {
continue;
}
if (bestLocation == null || l.getAccuracy() < bestLocation.getAccuracy()) {
// Found best last known location: %s", l);
bestLocation = l;
}
}
Log.i("zoom", "providers : " + bestLocation.getProvider() + ", loc : " + bestLocation);
return bestLocation;
구하는 함수는 이렇게 했는데요.. 문제는.. 제가 실내에 있음에도 불구하고.. provider 가 network 일 때 null 값을 리턴합니다.. ㅠㅠ 문제가 뭘까요..