Page 1 of 1

Geolocation frequency and other request settings

Posted: Thu Mar 20, 2014 7:54 am
by Tom6106181

Hi, I am wondering about the request settings for the geolocation component. Are there any docs explaining these?

The reason I ask, my app make use of this to save users geolocation to localstorage, and need to establish the users location on several pages before displaying google map, and other location based items.

Simply put, can I????

  • "On Device Ready - Invoke Service - GeoLocationService"

  • Request settings - FREQUENCY - 1000

    Will this update the users location to localstorage every 1000seconds or something like that? Eg, running the service automatically in background, not depending on what page the user is on??

    Would really like to know more about this service and its capabilities.

    Thanks!
    -Tom


Geolocation frequency and other request settings

Posted: Thu Mar 20, 2014 8:23 am
by Nikita

Hello,

Please look at this link:
https://getsatisfaction.com/apperyio/...

If you need to run the service with some frequency, it is better to use setTimeout: https://developer.mozilla.org/en-US/d...


Geolocation frequency and other request settings

Posted: Thu Mar 20, 2014 8:31 am
by Tom6106181

So there are no way, invoking service on device ready, and have it keep updating the users location in background?

eg; I need to invoke service on every page/screen I need to update user location?

Reading a bit here: http://docs.phonegap.com/en/3.0.0/cor...

Is this something I could use "app-wide" ??


Geolocation frequency and other request settings

Posted: Thu Mar 20, 2014 11:46 am
by Nikita

Hi,

Unfortunately, no. If you need to run service on every page, you should do it for each page separately.