mapbox / mapbox/mapbox-maps-android

Puck location bearing not accurate and constantly changing if device is idle

Open
#1,391 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

auto-triaged bug :beetle:
Dominant language
Kotlin
Stars
578
Forks
161
PR merge metrics
No merged PRs in 30d

Description

Environment

  • Android OS version: 11
  • Devices affected: Samsung Galaxy A52
  • Maps SDK Version: v10.5.0 (but also on the previous v10 versions)

Observed behavior and steps to reproduce

The location puck does not rotate when the device moves. Additionally, if the device is idle then the bearing frequently changes randomly and the location puck rotates to a direction that does not reflect the actual direction in which the device is facing.

I followed the exact instructions to include a location puck with bearing from the documentation (https://docs.mapbox.com/android/maps/guides/user-location/ and https://docs.mapbox.com/android/maps/examples/location-tracking/). This issue happens with both PuckBearingSource.HEADING and PuckBearingSource.COURSE.

Expected behavior

The location puck should accurately reflect the direction in which the device is heading. If I move the device, the bearing should change accordingly. If the device is idle, the bearing should not change and the location puck should not rotate.

Notes / preliminary analysis

This issue has been previously mentioned in #922. According to the comments, the issue as been tracked in #970, but the problem seems to have persisted.

This problem also happened in the previous v10 versions. The bearing would also not reflect the movements, but would also change randomly if the device is idle.

Additional links and references

I could include a video, but it's basically just the puck frequently rotating in random directions. And I also don't really want to reveal my exact location.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the behavior on Android 11 with the documented PuckBearingSource.HEADING and PuckBearingSource.COURSE configurations, using the user-location documentation and location-tracking example. Review the related discussions in issues #922 and #970 before locating the puck-bearing implementation; done means movement updates the bearing and an idle device does not cause random rotation.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.