Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow distance to be set when keepTracking(true) #24

Closed
donhill opened this issue Feb 5, 2017 · 3 comments
Closed

Allow distance to be set when keepTracking(true) #24

donhill opened this issue Feb 5, 2017 · 3 comments

Comments

@donhill
Copy link

donhill commented Feb 5, 2017

It looks like a 0 being passed for distance when getting updates. This allows onLocationChange to keep firing even when location.distanceTo(oldLocation) == 0.0F. For now I will calculate the distance but this seems like a lot of radio usage.

The following line is passing in 0 for distance setting

currentUpdateRequest = new UpdateRequest(provider, timeInterval, 0, locationChangeListener);

https://developer.android.com/reference/android/location/LocationManager.html#requestLocationUpdates(java.lang.String, long, float, android.location.LocationListener)

@yayaa
Copy link
Owner

yayaa commented Feb 5, 2017

You're right! I should update this :) Will be done, within current developments and announce here.
Thanks for reporting 👍

@yayaa
Copy link
Owner

yayaa commented Mar 22, 2017

v2.0.0 is just released, and it is possible now.

@yayaa yayaa closed this as completed Mar 22, 2017
@donhill
Copy link
Author

donhill commented Mar 22, 2017

Great thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants