ConsentRepository

Requests consent through UMP and applies consent choices to Firebase. Every function is safe to call from the main thread.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun applyConsentSettings(settings: ConsentSettings)

Applies the provided consent settings to Firebase services.

Link copied to clipboard
abstract suspend fun applyInitialConsent()

Reads the stored consent choices and applies them to Firebase services. Unset choices are granted in release builds and refused in debug builds.

Link copied to clipboard
abstract suspend fun requestConsent(host: ConsentHost, showIfRequired: Boolean = true)

Updates the consent information and shows the consent form: only when UMP requires it when showIfRequired is true, always otherwise. Returns once the round trip has ended. A caller that asks while a matching round trip is running waits for that one instead of starting another.