this subject has been discussed quite a lot, i suggest you search the net and this forum for answers.
the short list of things you need to know: - use location change listeners for changes when the device is awake and responding - use alarms to wake the device for periodical updates - Since a service does not guarantee it will remain alive to send the location changes, make sure you take a power/cpu wake lock every time a change needs to be sent (especially when being awoken by an alarm) - do not try to keep a service as foreground and keep the wake lock forever, this will just drain the battery. let the device sleep and only use wake locks for updating. - remember that the location returned is the last known one, let the device get a fix on it's current location. On Thursday, October 3, 2013 5:55:23 PM UTC+3, HImanshu Mittal wrote: > > Hello > > I am building the app that requires that users location has to be updated > on my server periodically or to be more efficient only when its location > has been updated. > For that a Service will run on its device. > But I am not able to develop that till now haven't found that does that > perfectly. > Please help > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

