GPS, HTTP POST not running while phone is locked
I am developing an app that is designed to post the user's current location to a web service at some given interval. I am currently testing with an Android device. Things work fine when the app is up on the screen, and the device is awake. However, when I lock the screen, it stops posting. If I bring up the lock screen, but not unlock it, it will post, but then stops again after the screen goes dark.
The phone must be allowed to be locked for this app to be useful, so keeping it awake is not an option. I am currently trying several things to get this app to respond while it is asleep, I have it firing on setInterval, a geolocation listener and a pause listener. I did try idleTimerDisabled, but that had no effect. I also searched the FAQ's here, but was not able to find a definitive answer to this question.
Is it possible for me to get this to work? This app needs to function the same in both Android and iOS. It is very important that I am able to do this on both platforms.
2 Answers
-
Accepted Answer
At the moment only background audio is supported, everything else (background processing, local notifications, geolocation etc) are slated for the 1.5 release of Titanium Mobile.
I can not speak for Android, but this is at least the case for iOS support, which is usually ahead of android support by a little.
How far is that away? I'm not sure if even Appcelerator know. Currently the bug tracker shows 33% completion but issues are being added as quickly as they are being fixed. I think the aim with 1.5 is to have a really solid release with hardly any bugs, before moving forward into 1.6 and beyond. 1.5 was supposed to drop in late September, so I have no idea how far it is away.
Hope that helps out a bit.
Cheers,
Angus -
This threat might be interesting for your project.