-
-
Notifications
You must be signed in to change notification settings - Fork 664
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
Add troubleshooting tool: location history #3886
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Initial setup saving data, no UI, cleanup or preferences yet
- Add a on/off setting for location history (default on) - Limit the history size to 48 hours, any older entries will be deleted during regular sensor updates - Add a basic UI for location history based on paging considering the possible data size with multiserver/high accuracy. The list looks good and shows status at a glance, detail view still needs work.
- Make the expanded UI nicer and show relevant data, buttons for opening the location in a maps app and sharing log data - Add empty states for location history
- Add option to filter by state - Simplify Room configuration and sort by indexed ID to improve list loading speed
dshokouhi
reviewed
Sep 23, 2023
app/src/full/java/io/homeassistant/companion/android/sensors/LocationSensorManager.kt
Outdated
Show resolved
Hide resolved
dshokouhi
approved these changes
Sep 25, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, been testing it for a few days. This should be very helpful to users who have issues with location tracking.
JBassett
approved these changes
Sep 28, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a troubleshooting tool for location tracking: a persistent location history (up to 48 hours, enabled by default).
Location updates on Android are hard to get your head around and the current troubleshooting steps with logs aren't very user friendly. This hopefully makes it easier for users to review and for us as developers to find things to improve. The location history is specifically intended as a troubleshooting tool, which is why there is limited UI (no maps for now!) and the updates are only stored 48 hours. If someone wants to do more, it should probably be handled on the server.
UI inspiration is Android's built-in notification history, trying to get more M3 elements in the app :)
Screenshots
Sharing converts the update to text with details untranslated, good for issues
Link to pull request in Documentation repository
Documentation: home-assistant/companion.home-assistant#987
Any other notes
The iOS app also does some location history logging but seemingly doesn't have the need to filter updates.
For the future I can imagine a status check at the top of the screen that tells you "everything is OK" or "setting X isn't optimal", which is why this screen is called location tracking and not location history.