GPS(2)
-
[Android] GPS 좌표값 두 개의 거리 구하기
double distance; Location locationA = new Location("point A"); locationA.setLatitude(latA); locationA.setLongitude(lngA); Location locationB = new Location("point B"); locationB.setLatitude(latB); LocationB.setLongitude(lngB); distance = locationA.distanceTo(locationB);
2014.08.11 -
GPS 사용!!
//GPS Setting onCreate 영역!! lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); Criteria c = new Criteria(); provider = lm.getBestProvider(c, true); if(provider==null || !lm.isProviderEnabled(provider)){ List list = lm.getAllProviders(); for(int i=0; i < list.size(); i++){ String temp = list.get(i); if(lm.isProviderEnabled(temp)){ provider = temp; break; } } } // GPS search end Loc..
2014.07.07