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

Better indicate when there is no GPS signal #3977

Merged
merged 4 commits into from
Apr 26, 2022
Merged

Conversation

westnordost
Copy link
Member

@westnordost westnordost commented Apr 20, 2022

fixes #3944

@mnalis Would you be available to test this? I have no idea how you were able to simulate a situation where the GPS signal was cut off.

@westnordost westnordost changed the title No gps signal Better indicate when there is no GPS signal Apr 20, 2022
@matkoniecz

This comment was marked as resolved.

@westnordost
Copy link
Member Author

I don't know what this gif is supposed to show, I don't see the GPS icon blinking. So anyway, @mnalis or @matkoniecz are you available to test this?

@mnalis

This comment was marked as outdated.

@matkoniecz

This comment was marked as resolved.

@mnalis
Copy link
Member

mnalis commented Apr 25, 2022

I've managed to compile it and make a quick test; it seems that:

  • blinking navigation arrow icon is working
  • hiding the blue dot on the map (and blue transparent circle sector showing direction user is looking at) is not working (if I understand it correctly what PR was supposed to do)

Here is the example video just after signal loss:

small_SVID_20220425_194115_1.mp4

(Steps: I had SC in foreground with working GPS signal just outside the building, then I turned screen off and entered the building thus losing GPS fix; after turning screen back on the SC which was still in foreground looked like video above).

@westnordost
Copy link
Member Author

Thank you for testing it! I will try to find the bug. Maybe I will also build a tinfoil box in which I could test it (if that is enough to block the signal)

@westnordost westnordost self-assigned this Apr 25, 2022
@westnordost
Copy link
Member Author

Hm, it looks like there is not any callback that is called when location is lost. The only reason why the GPS button blinks in that case is that on initialization (when the app comes back into view), that button's state is first set to "searching" and only when the first location is reported back from the Android system, the state is set to "has location".

The same cane be done for the location dot of course. But note that this fix wouldn't help in the case when you lose location while the app is in foreground.

@westnordost
Copy link
Member Author

And it leads to some ugly blinking, i.e. the blue dot vanishes when the app comes back into view for ~1 second and pops back in after that. Every time you tab out and in. Given it would not really be a wholesome fix anyway, I rather not do that.

So, I'll merge it as is.

All works as expected when one disables location.

@westnordost westnordost merged commit 95ae5b9 into master Apr 26, 2022
@FloEdelmann FloEdelmann deleted the no-gps-signal branch April 26, 2022 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better indicate when there is no GPS signal
3 participants