1
I have an application that works as a GPS tracking, is working normal, when the user moves he plays on my server the change that makes all the devices change places the Marker. However I need to make the function Onmylocationchangelistener, work even with the application closed, I thought in a Service, but I do not know if this is possible. Does anyone know if it is? If it is not, there is a better way to do it?
Yes, it is possible. In the same way it connects with
GoogleApiClientinActivity, it is possible to do in aService, but will use theLocationClientand not theGoogleMap. Just watch out for the use of GPS, don’t let theServiceactive without need, because GPS uses a lot of battery. To use theLocationClienthave a look at http://developer.android.com/training/location/receive-location-updates.html.– Wakim
Oops, thanks, I’ll try to use.
– Gabriel Duarte