Skip to content

Consent

Francisco Dias edited this page Nov 19, 2024 · 12 revisions

Consent

This module contains functions related to requesting the user's consent.

Functions

This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.



Back To Top

AdMob_Consent_RequestInfoUpdate

This function requests a consent information update (this needs to be called prior to AdMob_Consent_Load).

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.


Syntax:

AdMob_Consent_RequestInfoUpdate(mode)
Argument Type Description
mode AdMobConsentMode The consent mode



Returns:

N/A


Triggers:

Social Async Event

Key Type Description
type AdMobEvent The constant ADMOB_EV_CONSENT_INFO_UPDATED

Key Type Description
type AdMobEvent The constant ADMOB_EV_CONSENT_INFO_UPDATE_FAILED
errorMessage String the error code responsible for the failure
errorCode Real the error message of the error code



Back To Top

AdMob_Consent_GetStatus

This function allows to set the mode of the consent request being used. This function allows you to debug different regions and EEA and NON-EEA and should be passed in as a AdMobConsentMode constant.

This function should be called before AdMob_Consent_GetStatus and AdMob_Consent_GetType in order to get the correct output from both functions.

Note

This function requires a previous call to AdMob_Consent_RequestInfoUpdate.


Syntax:

AdMob_Consent_GetStatus()



Returns:

AdMobConsentStatus




Back To Top

AdMob_Consent_GetType

This function returns the answer given by the user to a previous GDPR consent request.


Syntax:

AdMob_Consent_GetType()



Returns:

AdMobConsentType




Back To Top

AdMob_Consent_IsFormAvailable

This function checks whether or not the GDPR consent form is available on this device.


Syntax:

AdMob_Consent_IsFormAvailable()



Returns:

Boolean




Back To Top

AdMob_Consent_Load

This function loads the consent form into memory so it can be displayed to the user. If you do not call this function before trying to show the GDPR consent, nothing will be shown.

Note

This function requires a previous call to AdMob_Consent_RequestInfoUpdate.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.


Syntax:

AdMob_Consent_Load()



Returns:

N/A


Triggers:

Social Async Event

Key Type Description
type AdMobEvent The constant ADMOB_EV_CONSENT_LOADED

Key Type Description
type AdMobEvent The constant ADMOB_EV_CONSENT_LOAD_FAILED
errorMessage String the error code responsible for the failure
errorCode Real the error message of the error code



Back To Top

AdMob_Consent_Show

This function shows the consent form to the user. If you do not call the AdMob_Consent_Load function before trying to show the GDPR consent, nothing will be shown.

Note

This function requires a previous call to AdMob_Consent_Load.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.


Syntax:

AdMob_Consent_Show()



Returns:

N/A


Triggers:

Social Async Event

Key Type Description
type AdMobEvent The constant ADMOB_EV_CONSENT_SHOWED

Key Type Description
type AdMobEvent The constant ADMOB_EV_CONSENT_SHOW_FAILED
errorMessage String the error code responsible for the failure
errorCode Real the error message of the error code



Back To Top

AdMob_Consent_Reset

This function resets the consent status flag.


Syntax:

AdMob_Consent_Reset()



Returns:

N/A




Back To Top

AdMob_Consent_Set_RDP

Enables or disables Restricted Data Processing (RDP) to comply with privacy regulations in specific U.S. states.

Note

Developers must determine the appropriate timing to activate RDP based on their application's compliance requirements.


Syntax:

AdMob_Consent_Set_RDP(enable)
Argument Type Description
enable Boolean Set to true to enable RDP, or false to disable it.



Returns:

N/A


Versioning:

  • 1.4.0 - This function was introduced.


Clone this wiki locally