Geolocation problems
Ever since recompiling in 1.4 and sdk 4 (as opposed to my app in store compiled in 1.2 and sdk3.1.3) I have been having problems with the geolocation. While it was pretty accurate before (The listener sets an app.property to pull when making a record of a bird), now it seems to freeze in a location often, not changing the variable. This especially happens after a crash (which crash log points to watchdog timeout which I asked a question about but never figured out). Has anyone found similar or have any ideas? When app is closed it shows the geolocation services are still enabled.
4 Answers
-
The problem is that things don't re-run correctly after re-launching from the crash. The location listener doesn't run. The orientation listeners don't run. If I shut the app down fully and re-launch it seems to work. That's a pretty bad behavior. Anyone weigh in and help me?
-
post your code ( using correct formatting syntax ) or a link to the code on pastie.org and i'll check it out to give you some advise.
rocksteady,
danno~
-
Thanks Danno. The frustrating part here is that it is working and solid with the 1.2/sdk3.1.3 compile but giving these errors with the 1.4/sdk4 compile. I still think there is something else afoot as I'm crashing a lot more and it's after this crash that the app doesn't 'reset' itself to run the location listener. I'll be out testing my app in the field all day with some error feedback in alert dialogs (it's a birding app).
pastie: http://pastie.org/1122232
-
Kevin,
I've been having issues with geolocation, but for android development. In my case, I have to manually set a location in the emulator or my app crashes. Do you have to do so for iPhone? Partially that's a limitation of Titanium's android support – the Titanium.Geolocation.locationServicesEnabled property isn't supported on android yet.
I was having some issues due to the async nature of location detection. Perhaps you're facing similar issues? Like, maybe the location detection hasn't finished by the time you're using the values? See my question at http://developer.appcelerator.com/question/55371/titaniumgeolocationgetcurrentposition-wont-work-within-a-function
Also, I've been downloading the latest-build versions of the API and have had better luck with things running as expected. YMMV as there might be new bugs or broken functionality. If you scan the Q&As, 1.4 stock seems to have a few issues.
I'm a birder, or more specifically a bluebird monitor. So, your app sounds interesting. If you need a beta tester on android, let me know.
Tim