问题
How to get location update for every 1000 meter,ie update only if am moving ,with fused api integration.
回答1:
When you are building your LocationRequest
to be used by the FusedLocationApi
you can use the method setSmallestDisplacement(...)
as specified in the documentation like below:
locationRequest.setSmallestDisplacement(1000);
Note that the argument is in meters.
来源:https://stackoverflow.com/questions/35249408/android-location-update-with-fusedapi-only-if-am-moving