[android-components](../../index.md) / [org.mozilla.telemetry.config](../index.md) / [TelemetryConfiguration](index.md) / [setCollectionEnabled](./set-collection-enabled.md)

# setCollectionEnabled

`open fun setCollectionEnabled(collectionEnabled: `[`Boolean`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html)`): `[`TelemetryConfiguration`](index.md) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/service/telemetry/src/main/java/org/mozilla/telemetry/config/TelemetryConfiguration.java#L263)

Enable or disable collection of telemetry data. Local dev builds should disable this to avoid collecting and sending any data.

