Titianium SDK 버전 : 3.1.3.GA
Alloy version : 1.0
OS 버전 : Window7 / 32bit
mobile OS 버전 : android 4.x
if(Titanium.Geolocation.locationServicesEnabled)
{
Titanium.Geolocation.accuracy = Titanium.Geolocation.ACCURACY_BEST;
Titanium.Geolocation.distanceFilter = 10;
Titanium.Geolocation.preferredProvider = Titanium.Geolocation.PROVIDER_GPS;
Titanium.Geolocation.getCurrentPosition(function (e)
{
if (e.error)
{
// manage the error
return;
}
currLongitude = e.coords.longitude;
currLatitude = e.coords.latitude;
});
}
현재 소스는 이렇게 되어있습니다.
문제는 앱에서 off 되어있는 gps 기능을 on 시켰을 때,
Titanium.Geolocation.getCurrentPosition 이 먹히지 않습니다 ㅠㅠ
GPS의 ON/OFF 상태를 수시로 체크하여 현재 위치를 좌표로 알고 싶은데
코드상에 어떤 문제가 있는 걸까요 ㅠㅠ?