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

Disable Telemetry in Compose Attribution

Open FloTank opened this issue 1 year ago • 1 comments

New Feature

When using the Attribution introduced in the Compose - MapboxMap in (and after up until the lastest Version) Version 11.3.0+, one can't disable telemetry afterwards by code anymore.


    MapboxMap(
        composeMapInitOptions = ComposeMapInitOptions(
            pixelRatio = context.resources.displayMetrics.density,
            textureView = true
        ),
        attribution = {
            Attribution(
                iconColor = attributionIconColor
            )
        },
    ) {
        MapEffect(Unit) { mapView ->
            mapView.attribution.apply {
                setCustomAttributionDialogManager(MapboxAttributionDialogManager(context))
                getMapAttributionDelegate().telemetry().apply {
                    userTelemetryRequestState = isMapTrackingAllowed
                    if (isMapTrackingAllowed.not()) disableTelemetrySession()
                }
            }
        }
    }

Previously with the AttributionSettings something like this was allowed, as the PluginId of the mapView.attribution was set. Now, after introducing the Attribution() Composable another Plugin Id is used, which we can't access so the mapView.attribution is not accessible anymore as it crashes.

As of right now I can't find a way to do the same things we did in the mapView.Attribution in the new Attribution Composable. A custom Dialog is possible but Telemetry can't be disabled.

Why

The User should also be able to disable telemetry in the App Settings so we need to pass it to MapBox

FloTank avatar Aug 16 '24 09:08 FloTank

@FloTank thanks for reporting. We are tracking this internally and will let you know when it's implemented.

kiryldz avatar Aug 29 '24 14:08 kiryldz

Shouldn't this get like some high priority? Not being able to set the telemetry seems like a potential GDPR issue to me.

JanTie avatar Nov 07 '24 09:11 JanTie

@kiryldz , any update?

rschattauer avatar Nov 04 '25 12:11 rschattauer