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

Restart location updates if we detect too much time passed since last update #2732

Merged
merged 3 commits into from Aug 3, 2022

Conversation

dshokouhi
Copy link
Member

Summary

Should hopefully fix #2681 and fix #2720 by evaluating how much time has passed since lastLocationReceived. If background location updates are supposed to be on we will check lastLocationReceived with the addition of double the max wait time. If high accuracy mode is on we will double the amount of time for the defined interval. If we detect too much time has passed we will stop services and start them again shortly thereafter.

Screenshots

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

Any other notes

@dshokouhi
Copy link
Member Author

So FWIW during testing originally I was going by lastLocationSend the issue with that is when we are using background location updates we also don't send updates if location has not changed in 15 minutes. That actually caused the code restart every 15 minutes so I came to know the code was working fine there. For High accuracy mode, the same thing should apply. In these cases the assumption is that updates were working in the background and then suddenly stopped coming in so we detect if we should restart things.

In cases where the app is killed all local variables used will revert back to default triggering the whole process to restart.

Copy link
Collaborator

@JBassett JBassett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw we go for it, I want to get this into our next release which I hope to have next week if possible so It would be nice to get this in beta this week.

@JBassett JBassett merged commit 67d77d3 into home-assistant:master Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Location tracking Problems in Beta Version Android App Stops Sending High Accuracy Location Updates
4 participants