2

Hi I want to write Fused location in Service which run in background continuously. where i can write code for send location to server. I have implement it in Activity now i want to implement it in Service.Please help me.

Rana
  • 134
  • 2
  • 2
  • 11

1 Answers1

2

You can extends the Service and implemetns the methods

public class BackgroundLocationService extends Service implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServicesClient.OnConnectionFailedListener, LocationListener

Check this code for implementation Background location services.

remember just remove your location updates properly. otherwise service will not stop by calling stopService method

Ameer
  • 2,709
  • 1
  • 28
  • 44