mapbox-maps-flutter icon indicating copy to clipboard operation
mapbox-maps-flutter copied to clipboard

Mapbox Requests Location Before Use (Not Compliant With Chinese App Store Requirements)

Open M2dL1fe opened this issue 2 months ago • 1 comments

Before Mapbox is actually used in the app, Mapbox is already requesting the user’s location. This behavior does not comply with the requirements of the Chinese app marketplaces. Version 2.8.0 did not have this issue.

Below is the stack trace provided by the app marketplace:

com.mapbox.common.location.AndroidDeviceLocationProvider.doStart(AndroidDeviceLocationProvider.kt:152)
com.mapbox.common.location.BaseDeviceLocationProvider.start(BaseDeviceLocationProvider.kt:63)
com.mapbox.common.location.BaseDeviceLocationProvider.addLocationObserver(BaseDeviceLocationProvider.kt:2)

Is there a way to prevent Mapbox from accessing the user’s location before it is actually needed or before the user grants permission? This issue causes the app to be rejected during the review process in China.

M2dL1fe avatar Nov 28 '25 02:11 M2dL1fe

Isn't this only when you update LocationComponentSettings? I found that it asks regardless of whether it is enabled, but simply not calling location.updateSettings avoids it. Still not desired behavior imo.

Kris9000 avatar Nov 28 '25 08:11 Kris9000

Thanks for the clarification. Do you know when this issue might be fixed?

This behavior currently prevents our app from being approved in the Chinese app marketplaces, because any location access before explicit user action violates their compliance requirements.

A timeline or planned fix would really help us decide whether we should wait, downgrade to an older SDK, or implement an alternative solution.

Thanks again for your support. @Kris9000

M2dL1fe avatar Dec 01 '25 02:12 M2dL1fe

I don't work for Mapbox, so I have no idea when they'll fix it. I work around it by checking permissions before setting this parameter so it's only ever set to true.

Kris9000 avatar Dec 01 '25 06:12 Kris9000