delight-im / Android-SimpleLocation

Utility class for easy access to the device location on Android
Apache License 2.0
200 stars 75 forks source link

Speed is 0.0 and interval is not decreased #29

Closed aminabyaneh closed 6 years ago

aminabyaneh commented 6 years ago

Hi marco! Thanks for your wonderful library. I came up with two minor issues. First one is that the speed is always zero! Second one is how can I decrease intervals in locationChangeListener? It always updates with 20 seconds!

ocram commented 6 years ago

Thanks for your appreciation!

The speed may not always be available. So you cannot really rely on that piece of information. Are you using network (coarse) location or GPS (fine) location? For network location, it’s unlikely the speed will ever be available.

As for changing the interval of location updates, the SimpleLocation constructor supports an interval in milliseconds as its fourth parameter, as documented in the README.