mapbox / mapbox/mapbox-maps-flutter

In Android When I close the page that contains the map, system says I'm still accessing location information

Open
#561 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
380
Forks
204
PR merge metrics
No merged PRs in 30d

Description

I can reproduce it using the Location Component code in the example. Android devices: Google Pixel 7 Pro, Android 14, Flutter 3.22.1.

I hope I can stop positioning when I close the page that displays the map. Or is there any method I can call to stop positioning?

I triedmapboxMap?.location .updateSettings(LocationComponentSettings(enabled: false)); and mapboxMap?.dispose();, but it didn't work

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

Reproduce the issue with the Location Component example on Android 14 using Flutter 3.22.1, then inspect the page lifecycle and the location component's cleanup behavior. Verify what happens after closing the map page and identify a supported way to stop location access; done means the system no longer reports active location use after the page is closed.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, dart, flutter
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.