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 TypeMethodDescriptionbooleanTrue when the provider has enough consent to request ads.intThe current consent status without triggering a new request.voidrequestConsent(boolean underAgeOfConsent, AdCallback<Integer> onComplete) Gathers consent if required, presenting the consent form when necessary, and (on iOS) the App Tracking Transparency prompt.voidreset()Clears stored consent.
-
Method Details
-
requestConsent
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 inAdConsent) on completion.Parameters
underAgeOfConsent: whether the user is tagged as under the age of consentonComplete: 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.
-