현재 위치를 가져 오지 못하지만 대부분의 휴대 전화에서는 실패했습니다. 다음 mycode입니다 :android가 현재 위치를 가져 오지 못했습니다.
public Location getLocation(Context context)
{
LocationManager locMan = (LocationManager) context
.getSystemService(Context.LOCATION_SERVICE);
Location location = locMan
.getLastKnownLocation(LocationManager.GPS_PROVIDER);
if (location == null)
{
location = locMan
.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
}
return location;
}
It * failed * thats ** VERY ** 도움이되었습니다. – JoxTraex
추가 정보가 필요합니다. 매니페스트에 필요한 권한을 추가 했습니까? – Tony
혹시라도 오류가 있습니다 .. stacktrace 붙여 넣기 – Chet