SetGDPRConsent

Description

Pass the GDPR consent obtained from the user to the plugin. Not required on iOS

Declaration

 public static void SetGDPRConsent(bool accept)

Parameters

NameDescription

accept

true - user accepted personalized ads false - user refused personalized ads

Example

public class Test : MonoBehaviour
{
    public void SHowCustomConsentPopup()
    {
        if (!Gley.MobileAds.API.GDPRConsentWasSet())
        {
            //show custom consent popup
            //get consent from the user and pass it to this method
            //in this case user accepted the request
            Gley.MobileAds.API.SetGDPRConsent(true);
        }
        else
        {
            //consent popup is not required
        }
    }
}

Last updated