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.