I am working on an iphone app which needs to pop up a notification when the user reaches some particular place. I am developing the app in phonegap. A function is available in phonegap to track gps location continuously i.e. "geolocation.watchPosition", but I want to know: will the function keep on tracking the location even if the app is not running(exited state)?
Asked
Active
Viewed 7,092 times
2 Answers
4
I recently came to know that for the desired functionality I have to create a phonegap plug in and embed it to the project. This worked for me.

Harshit Gupta
- 1,200
- 12
- 27
-
1Is it an open source plugin? if so could you provide a link to it? – Christopher Mar 15 '12 at 09:47
-
@Christopher sir i developed it at my own according to my requirements. It's so easy to develop a plug-in. Please refer the link if you also want to develop plug-in.[link]http://hiediutley.com/2011/04/15/phonegap-tutorial-series-6-writing-your-own-plugin/... the link will also take you to github repository from where you can download the readymade plug-ins. – Harshit Gupta Mar 15 '12 at 09:56
0
you can do it if your app is runing in background
but its not possible if the user stops the application
check this post
Is it possible to run a background process on the iPhone using private APIs?
-
sir, I also tried to keep the task of background processing on native part and afterwards combine it with phonegap part to get full working app, but as the notification arrives(in case app is not running, not even in background) and it asks for whether to open the app and when I open the app, then it only shows the splash screen and get fade off and automatically moves to background state that can be seen by double clicking the home button...any clues sir...according to you where should I put the native code for continuous gps tracking and generating notifications? – Harshit Gupta Jan 27 '12 at 03:30