booklet icon indicating copy to clipboard operation
booklet copied to clipboard

locatorDisplace default value - code 500m vs documentation 0m

Open Dopeyr opened this issue 5 years ago • 3 comments

  • App build number: 2.1.3 (23102)
  • Android version: 9
  • Device: Xiaomi Mi A1

Hi,

This is a question about the locatorDisplacement value. In the docs, it says:

locatorDisplacement: The smallest displacement in meters the user must move between location updates. Defaults to 0 and is an and relationship with interval. Can be used to only receive updates when the device has moved.

(bold is mine)

However, in the preferences the default value is 500

I think the documentation is confused with the default in the android LocationRequest docs, where 0 is the default, if you don't set it.

In my (limited) experience so far, 500m is the distance that you need to move to trigger an update.

So my question is: which is right? Should the default in the preferences be 0, or should the documents specify 500 as the default?

I'm not a Java dev, so I'm trying to piece things together "from the outside" - please let me know if I'm way off track :)

Thanks, Andy.

Dopeyr avatar May 22 '20 21:05 Dopeyr

Hi Andy,

The "tricky thing" about locatorDisplacement and locatorInterval is the fact that there is an and relationship between the two: you need to have moved (at least) locatorDisplacement meters in a timespan of locatorInterval seconds - else, no position update will be delivered.

I presume that the statement "Defaults to 0" in the documentation was indeed meant as "Defaults to 0 on the Android platform". Might be confusing indeed.

Oh, and I think you can state, by definition, that you are always on your own track(s).

Best regards, Chris (just a member here, not a contributor in the project).

boogymantoo avatar May 23 '20 06:05 boogymantoo

Oh, and I think you can state, by definition, that you are always on your own track(s).

😄

Dopeyr avatar May 24 '20 15:05 Dopeyr

I think we could do with a little clarity on the booklet. This is a confusing subject and can be non-intuitive. I'll migrate this over.

growse avatar Nov 08 '20 15:11 growse