# Interface AdConsentController

public interface AdConsentController

A provider's consent and privacy controller, backing the public `AdConsent` facade. Implementations wrap the GDPR consent flow (e.g. Google's User Messaging Platform) and, on iOS, the App Tracking Transparency prompt.

This is an internal SPI type.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `canRequestAds()`
  True when the provider has enough consent to request ads.
  `int`
  `getConsentStatus()`
  The current consent status without triggering a new request.
  `void`
  `requestConsent(boolean underAgeOfConsent, AdCallback<Integer> onComplete)`
  Gathers consent if required, presenting the consent form when necessary, and (on iOS) the App Tracking Transparency prompt.
  `void`
  `reset()`
  Clears stored consent.

- ## Method Details

  - ### requestConsent

    void requestConsent(boolean underAgeOfConsent, AdCallback<Integer> onComplete)

    Gathers consent if required, presenting the consent form when necessary, and (on iOS) the App Tracking Transparency prompt. The callback receives the resulting status (one of the `STATUS_*` constants in `AdConsent`) on completion.

    ###### Parameters

    - `underAgeOfConsent`: whether the user is tagged as under the age of consent
    - `onComplete`: invoked with the resulting consent status

  - ### getConsentStatus

    int getConsentStatus()
    The current consent status without triggering a new request.

  - ### canRequestAds

    boolean canRequestAds()
    True when the provider has enough consent to request ads.

  - ### reset

    void reset()
    Clears stored consent. Intended for testing only.