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.
Asked
Active
Viewed 1.0k times
1 Answers
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
-
private LocationClient mLocationClient; method is now deprecated – Rana Apr 21 '16 at 06:37
-
have you checked the link? – Ameer Apr 21 '16 at 06:45
-
yes. i have check this link this link used LocationClient now its deprecated – Rana Apr 21 '16 at 06:53
-
check this and change method according to new method http://stackoverflow.com/questions/24611977/android-locationclient-class-is-deprecated-but-used-in-documentation – Ameer Apr 21 '16 at 08:26