When I disable the location service, it seems Ti.Geolocation.locationServicesEnabled always returns true.
log.info("locationServicesEnabled = " + Ti.Geolocation.locationServicesEnabled); if(Ti.Geolocation.locationServicesEnabled){ log.info("Adding the location event listener."); Ti.Geolocation.addEventListener('location', _getCurrentPositionCallback); locationAdded = true; }Here is what the callback looks like.
var _getCurrentPositionCallback = function(evt) { log.info("========================="); Ti.Geolocation.getCurrentPosition(function(e){ log.info(JSON.stringify(e)); if(e.success){ updateStatusParamObj.latitude = e.coords.latitude; updateStatusParamObj.longitude = e.coords.longitude; } ...The output is like:
[INFO] : [10/15/2014 11:1:6] locationServicesEnabled = true [INFO] : [10/15/2014 11:1:6] Adding the location event listener. [INFO] : [10/15/2014 11:1:6] =========================Then it hangs there. It happened to me on both the simulator and the device. Has anyone experienced the same thing?