OS 4.0 and geolocation
Hi guys,
I'm trying to run my app on OS 4.0.
I downloaded and compiled the 1.3.3 sdk.
Geolocation doesn't work both on my app and kitchensink.
It seems that events don't fire. I also added
Ti.Geolocation.purpose = "GPS demo";
But with no result.
Thanks for your help!
Regards,
Flavio
[UPDATE] kitchensink geolocation doesn't work on simulator but it works on the device. Trying to fix my app.
3 Answers
-
Generally the simulators/emulators don't provide for geolocation - although some of them do allow mock locations via their control app to be set (adb on Android & gdb on Apple).
You should check Ti.Geolocation.locationServicesEnabled to see if location services are available - technically this should do the heavy lifting for you - but I'm not sure it works in all scenarios.
-
I have the same issue, on one machine Geolocation works (kitchensink + emulator), on the other it doesn't. LocationServices are Enabled. I've tried looking for settings to allow location services, but could not find any in the emulator, emulator prefs, or titanium developer.
-
If you are using iOS 4.0+ as well as OSX 10.6+ with location services enable (System Preferences/Security and Privacy/Privacy/ Enable Location Service check box) the simulator should return YOUR ACTUAL LOCATION INFO to the
Ti.Geolocation.getCurrentPosition
function. With this in mind,userLocation = true
on a mapview will still display your current location at Apple Headquarters in Cupertino CA.