Removing location updates using FusedLocationApi NOT working

733 Views Asked by At

hello Im trying to stop location updates and I have used this code:-

LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, mLocationRequest, this)

But later I've noticed they stop using "FusedLocationApi" because its kinda deprecated. So guys, how can i stop location updates?

1

There are 1 best solutions below

0
On BEST ANSWER

In newer Google place Services FusedLocationApi is deprecated. And what i understand from your question that you want remove location, so in your case i think this the way to do it:

mFusedLocationClient.removeLocationUpdates(mLocationCallback);