Example #1
0
        private void InitSDK_Click(Object sender, RoutedEventArgs e)
        {
            // SDK Config: additional options
            VungleSDKConfig sdkConfig = new VungleSDKConfig();

            // Set minimum disk space required to initialize or load ads (in bytes)
            //sdkConfig.MinimumDiskSpaceForAd = 50 * 1024;
            //sdkConfig.MinimumDiskSpaceForInit = 50 * 1024;

            //Disable tracking of Hardare ID
            //sdkConfig.DisableAshwidTracking = true;

            sdkConfig.DisableBannerRefresh = false;

            // Obtain Vungle SDK instance
            sdkInstance = AdFactory.GetInstance(appID, sdkConfig);

            this.vungleBannerControl.AppID = appID;

            sdkInstance.UpdateConsentStatus(VungleConsentStatus.VungleConsentAccepted, "1.0");

            //Register event handlers
            sdkInstance.OnAdPlayableChanged += SdkInstance_OnAdPlayableChanged;
            sdkInstance.OnAdStart           += SdkInstance_OnAdStart;
            sdkInstance.OnAdEnd             += SdkInstance_OnAdEnd;
            sdkInstance.Diagnostic          += SdkInstance_Diagnostic;
            sdkInstance.OnInitCompleted     += SdkInstance_OnInitCompleted;

            InitSDK.IsEnabled = false;
        }
 public void UpdateConsentStatus(Vungle.Consent consent, string version = "1.0")
 {
     if (Vungle.Consent.Undefined == consent)
     {
         return;
     }
     if (sdk != null)
     {
         sdk.UpdateConsentStatus((Vungle.Consent.Accepted == consent) ? Consent.Accepted : Consent.Denied, version);
     }
 }