UserConsentState

@MapboxExperimental
class UserConsentState

Represents user consent preferences for data collection and location services.

This data class enables programmatic management of user consent states for telemetry and geofencing features, allowing you to implement custom consent UI flows outside of the default attribution interface.

Telemetry and Privacy

Your users should be in charge of their own location data and when it is shared. By default, whenever your application causes the user's location to be gathered, it sends de-identified location and usage data to Mapbox. If you're developing a native app with one of the Mapbox mobile SDKs, our terms of service require that you provide a telemetry opt-out option within your app for all end users. The default attribution control includes an opt out button. If you hide the attribution control, you must provide an alternative opt out method your users can use. You are responsible for allowing your users to opt out of Mapbox Telemetry.

See guide for more info.

Types

Link copied to clipboard
@MapboxExperimental
class Builder

Builder for UserConsentState.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean

Determine if this object is equal to the specified other object.

Link copied to clipboard
open override fun hashCode(): Int

Calculate the hash code for this object.

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String

Return a string representation of this object.

Properties

Link copied to clipboard

Geofencing opt-in state.

Link copied to clipboard

Telemetry opt-in state.