Ejemplo n.º 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;
        }
Ejemplo n.º 2
0
	// Starts up the SDK with the given appId
	public static void init( string appId, string version )
	{
		VungleSDKConfig config = new VungleSDKConfig ();
		config.SetPluginName ("unity");
		config.SetPluginVersion (version);
		sdk = AdFactory.GetInstance(appId, config);
		sdk.addOnEvent(VungleManager.onEvent);
	}
Ejemplo n.º 3
0
    // Starts up the SDK with the given appId
    public static void init(string appId, string version)
    {
        VungleSDKConfig config = new VungleSDKConfig();

        config.SetPluginName("unity");
        config.SetPluginVersion(version);
        sdk = AdFactory.GetInstance(appId, config);
        sdk.addOnEvent(VungleManager.onEvent);
    }
Ejemplo n.º 4
0
	// Starts up the SDK with the given appId
	public static void init( string appId, string version, params string[] placements )
	{
        VungleSDKConfig config = new VungleSDKConfig ();
        config.SetPluginName ("unity");
        config.SetPluginVersion (version);
        config.SetApiEndpoint(new Uri("http://ads.api.vungle.com"));
        sdk = AdFactory.GetInstance(appId, config, placements);
        sdk.addOnEvent(VungleManager.onEvent);
	}
    // Starts up the SDK with the given appId
    private void Initialize(string appId)
    {
        VungleSDKConfig config = new VungleSDKConfig();

        if (Vungle.minimumDiskSpaceForInitialization.HasValue)
        {
            config.SetMinimumDiskSpaceForInit(Vungle.minimumDiskSpaceForInitialization.Value);
        }
        if (Vungle.minimumDiskSpaceForAd.HasValue)
        {
            config.SetMinimumDiskSpaceForAd(Vungle.minimumDiskSpaceForAd.Value);
        }
        if (Vungle.enableHardwareIdPrivacy.HasValue)
        {
            config.SetDisableAshwidTracking(Vungle.enableHardwareIdPrivacy.Value);
        }
        config.SetPluginName("unity");
        config.SetPluginVersion(Vungle.PluginVersion);
        config.SetApiEndpoint(new Uri(endpoint));
        sdk = AdFactory.GetInstance(appId, config);
        sdk.AddOnEvent(VungleManager.OnEvent);
        VungleSceneLoom.Initialize();
    }