Beispiel #1
0
        private void CheckConsentStatus()
        {
            adProviderList = new List <AdProvider>();
            Consent consentInfo = Consent.GetInstance(this);

            consentInfo.AddTestDeviceId("********");
            consentInfo.SetDebugNeedConsent(DebugNeedConsent.DebugNeedConsentField);
            consentInfo.RequestConsentUpdate(this);
        }
Beispiel #2
0
        /// <summary>
        /// Check consent status.
        /// </summary>
        private void CheckConsentStatus()
        {
            Consent consentInfo = Consent.GetInstance(this);

            // To ensure that a dialog box is displayed each time you access the code demo, set ConsentStatus to UNKNOWN. In normal cases, the code does not need to be added.
            consentInfo.SetConsentStatus(ConsentStatus.Unknown);
            string testDeviceId = consentInfo.TestDeviceId;

            consentInfo.AddTestDeviceId(testDeviceId);

            // After DebugNeedConsent is set, ensure that the consent is required even if a device is not located in a specified area.
            consentInfo.SetDebugNeedConsent(DebugNeedConsent.DebugNeedConsentField);
            consentInfo.RequestConsentUpdate(this);
        }