Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable Telemetry in Compose Attribution #2461

Open
FloTank opened this issue Aug 16, 2024 · 1 comment
Open

Disable Telemetry in Compose Attribution #2461

FloTank opened this issue Aug 16, 2024 · 1 comment
Labels

Comments

@FloTank
Copy link

FloTank commented Aug 16, 2024

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

@kiryldz
Copy link
Contributor

kiryldz commented Aug 29, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants