-
Notifications
You must be signed in to change notification settings - Fork 141
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
Location puck not moving #2305
Comments
@iolandarosa7 thanks for reporting! Do you see similar behaviour e.g. in v11.1.0? Trying to understand if it's regression between v10 and v11 or purely in v11. |
Yes, I observed the behavior change after updating to version 11 in the following releases: 11.0.0, 11.1.0, and 11.2.0. This issue does not seem to occur in version 10. Thanks. |
Hello there, Upgraded to version 11.5.0 and we are still having the same issue. PuckMapboxCompressed.mp4Thanks, hope to hear from you! |
@alvaroliveiravoid could you please share how your bg service is accessing the location? We are interested in what location request you use. Moreover, did you look at replacing the default location provider used to drive the puck (see setLocationProvider()) |
@jush in our service we use the DeviceLocationProvider provided by mapbox. But we do change the request parameters though and maybe that is why the puck behaves weirdly. Here are some parameters we set
I did want to avoid to rewrite the location provider set for the puck. Seems to be a lot of code to rewrite and I am afraid that it could lead to some bugs from a custom implementation. I would like to know if there's any way we can only set the same request parameters for both? Thanks in advance for your help |
That is strange. As far as I can tell the request parameters you shared are the same than the ones in the 11.2 DefaultLocationProvider that drives the puck in the map. One thing you could try is to attach the debugger on your app and set breakpoint to DefaultLocationProvider.kt#L163 and inspect the locations. |
Hi, I followed your suggestion and did some debugging in We have a feature in the app that needs to access the background location. In order to get access to the background location, we have to request the user to give the app access to the location "All the time," even when the app already has location permissions enabled to show the puck. However, if I completely close the app and then reopen it again and choose the same feature again (this time with background permissions and the app not opening location settings), the puck works just as expected and follows the location updates that I am recording. I attached a video that shows this behavior in both cases (location updates are a bit weird in this video cause I am using GPS inside a building). More importantly, I noticed that whenever I requested location permissions and the app went to the background, this method in
And the app seems never to recover from this. Might not be related because I am not familiar with the implementation but it was a guess from what I saw during debug. Another information is that this feature completely works in mapbox v10, we only saw this bug happening after update to mapbox v11 |
I can confirm that this bug was fixed during the bugfix done for mapbox v 11.6.0 . |
Environment
Observed behavior and steps to reproduce
The location puck is not updating as frequent as expected.
We have a service that records user location on the background and draws the location update points on a map layer.
In version 10.16.6 of Mapbox the location puck is updated at the same time and with the same location that we receive the from the background service.
Looking at the map we can see that the location puck "follows" the same location updates that we receive from background service when the user is moving.
Now in version 11, in most cases, the puck just remains stopped in the map (both when app has connectivity or not) even knowing the user is moving and the phone is receiving location updates that are drawn on map layer.
After entering in this state the puck would only be updated to last location if we put the app on background and foreground again. And then the app keep receiving updates but the puck does not move...
Expected behavior
The puck should move when the user is moving and be up to date with the last known user location.
The text was updated successfully, but these errors were encountered: