mapbox / mapbox-gl-native

Interactive, thoroughly customizable maps in native Android, iOS, macOS, Node.js, and Qt applications, powered by vector tiles and OpenGL
https://mapbox.com/mobile
Other
4.34k stars 1.33k forks source link

Telemetry Settings cannot be changed programmatically #16627

Open stolzda opened 2 years ago

stolzda commented 2 years ago

Platform: Android Mapbox SDK version: 10.0.0

Note

This is a crosspost of https://github.com/mapbox/mapbox-maps-android/issues/772 because I don't know which is the right repository to post this issue.

Steps to trigger behavior

By default, telemetry seems to be enabled. We would like to integrate the settings into the app overall settings, and toggle the settings from there, which it seems it was possible, see:

mapbox/mapbox-gl-native#13304 mapbox/mapbox-gl-native-android#90 (comment)

These functions are not exposed anymore. With some digging I found the following:

val telemetry = mapView.getPlugin<AttributionPlugin>(Plugin.MAPBOX_ATTRIBUTION_PLUGIN_ID)!!
    .getMapAttributionDelegate().telemetry()
telemetry.disableTelemetrySession()
telemetry.setUserTelemetryRequestState(false)

Expected behavior

Telemetry is disabled, MapboxTelemetryService is stopped.

Actual behavior

MapboxTelemetryService keeps running, and neither seems the Telemetry to be disabled.

RafaelPena31 commented 2 years ago

I have the same problem

fabian-kotschenreuther commented 1 year ago

Any updates on this?