ConsentBuilder

public final class ConsentBuilder


Helper class used to enable fluent syntax in setConsent.

Important: In July 2025, we stopped releasing KTX modules and removed the KTX libraries from the Firebase Android BoM (v34.0.0). If you use KTX APIs from the KTX modules, we recommend that you migrate your app to use KTX APIs from the main modules instead. For details, see the FAQ about this initiative.

Summary

Public constructors

Public constructors

ConsentBuilder

public ConsentBuilder()

Public methods

getAdStorage

public final FirebaseAnalytics.ConsentStatus getAdStorage()

getAnalyticsStorage

public final FirebaseAnalytics.ConsentStatus getAnalyticsStorage()

setAdStorage

public final void setAdStorage(FirebaseAnalytics.ConsentStatus adStorage)

setAnalyticsStorage

public final void setAnalyticsStorage(FirebaseAnalytics.ConsentStatus analyticsStorage)