jobi mg
jobi mg

Reputation: 747

Android location update with fusedApi, only if am moving

How to get location update for every 1000 meter,ie update only if am moving ,with fused api integration.

Upvotes: 2

Views: 1371

Answers (1)

George Mulligan
George Mulligan

Reputation: 11923

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.

Upvotes: 3

Related Questions