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; }
private void InitSDK_Click(Object sender, RoutedEventArgs e) { // Obtain Vungle SDK instance // As of v6 including placements in initialization call is no longer required sdkInstance = AdFactory.GetInstance(appID); // SDK Config: additional options // Set minimum disk space required to initialize or load ads (in bytes) //VungleSDKConfig sdkConfig = new VungleSDKConfig(); //sdkConfig.MinimumDiskSpaceForAd = 50 * 1024 * 1024; //sdkConfig.MinimumDiskSpaceForInit = 50 * 1024 * 1024; //sdkInstance = AdFactory.GetInstance(appID, sdkConfig) //Disable tracking of Hardare ID //sdkConfig.DisableAshwidTracking = true; //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 InitializeVungle(string appID) { m_vungle = AdFactory.GetInstance(appID); m_vungle.OnInitCompleted += M_vungle_OnInitCompleted; m_vungle.OnAdPlayableChanged += M_vungle_OnAdPlayableChanged; m_vungle.Diagnostic += M_vungle_Diagnostic; }
// 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); }
// 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); }
public MainPage() { this.InitializeComponent(); //Obtain Vungle SDK instance sdkInstance = AdFactory.GetInstance("vungleTest"); //Register OnAdPlayableChanged event handler sdkInstance.OnAdPlayableChanged += SdkInstance_OnAdPlayableChanged; }
public MainPage() { InitializeComponent(); // Obtain Vungle SDK instance sdkInstance = AdFactory.GetInstance("Test_Windows"); // Register event handlers sdkInstance.OnAdPlayableChanged += SdkInstance_OnAdPlayableChanged; sdkInstance.OnAdStart += SdkInstance_OnAdStart; sdkInstance.OnVideoView += SdkInstance_OnVideoView; sdkInstance.OnAdEnd += SdkInstance_OnAdEnd; sdkInstance.Diagnostic += SdkInstance_Diagnostic; }
public MainPage() { InitializeComponent(); // Obtain Vungle SDK instance sdkInstance = AdFactory.GetInstance("591236625b2480ac40000028", new string[] { "DEFAULT18080" }); // Register event handlers sdkInstance.OnAdPlayableChanged += SdkInstance_OnAdPlayableChanged; sdkInstance.OnAdStart += SdkInstance_OnAdStart; sdkInstance.OnVideoView += SdkInstance_OnVideoView; sdkInstance.OnAdEnd += SdkInstance_OnAdEnd; sdkInstance.Diagnostic += SdkInstance_Diagnostic; }
private void InitSDK_Click(Object sender, RoutedEventArgs e) { //Obtain Vungle SDK instance sdkInstance = AdFactory.GetInstance(appID, new string[] { placement1, placement2, placement3 }); //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 ADPage() { this.InitializeComponent(); sdkInstance = AdFactory.GetInstance(appID, interst); //为广告位置加载广告 // sdkInstance.LoadAd(interst); //广告状态改变后事件 sdkInstance.OnAdPlayableChanged += SdkInstance_OnAdPlayableChanged; sdkInstance.OnAdEnd += SdkInstance_OnAdEnd; sdkInstance.OnInitCompleted += SdkInstance_OnInitCompleted; }
private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { ViewModel.AdLoadingSpinnerVisibility = Visibility.Visible; _adRequested = true; if (VungleAdInstance == null) { VungleAdInstance = AdFactory.GetInstance("5735f9ae0b3973633c00004b"); VungleAdInstance.OnAdPlayableChanged += VungleAdInstanceOnOnAdPlayableChanged; } else { VungleAdInstanceOnOnAdPlayableChanged(null, null); } }
// 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(); }
public void initializeSDK() { vungleProvider = AdFactory.GetInstance(appID); // From a core integration inmobiProvider = AdFactory.GetInstance(appID); // Simulate the handler that InMobi will reflect and attach itself to }
protected override void OnNavigatedTo(NavigationEventArgs e) { #if WIN10 if (sdkInstance == null && GameGlobal.IsShowVideoAds && IsConnectedToInternet()) { //sdkInstance = AdFactory.GetInstance("vungleTest"); sdkInstance = AdFactory.GetInstance("565f4a8bd0ed15880f00004c"); sdkInstance.OnAdPlayableChanged += SdkInstance_OnAdPlayableChanged; } else { progressRing.IsActive = false; } if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) { var statusBar = Windows.UI.ViewManagement.StatusBar.GetForCurrentView().HideAsync(); } progressRing.IsActive = false; var timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(7); timer.Tick += delegate { if (progressRing.IsActive && GameGlobal.IsShowVideoAds) { progressRing.IsActive = false; timer.Stop(); } }; timer.Start(); Frame rootFrame = Window.Current.Content as Frame; string myPages = ""; foreach (PageStackEntry page in rootFrame.BackStack) { myPages += page.SourcePageType.ToString() + "\n"; } if (rootFrame.CanGoBack) { SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Visible; } else { SystemNavigationManager.GetForCurrentView().AppViewBackButtonVisibility = AppViewBackButtonVisibility.Collapsed; } #endif //IsGallery = string.Empty; //string[] parameters = e.Parameter.ToString().Split(','); //string sCategory = parameters[0]; //IsGallery = sCategory == "-1" ? parameters[1] : string.Empty; //mImages.Clear(); //if (string.IsNullOrEmpty(IsGallery)) //{ #if WIN10 string[] dirs = DirectoryGetFiles("Masha"); foreach (string dir in dirs) { mImages.Add(new ImageEntity { ImageSource = new BitmapImage(new Uri("ms-appx:///" + dir, UriKind.RelativeOrAbsolute)) }); } #endif #if WIN8_1 progressRing.IsActive = false; string category = "Masha"; var dirs = DirectoryGetFiles(category); foreach (var dir in dirs) { mImages.Add(new ImageEntity { ImageSource = new BitmapImage(new Uri("ms-appx:///Res\\Image\\" + category + "\\" + dir.Name, UriKind.RelativeOrAbsolute)) }); } #endif //} //else //{ // mImages.Add(new ImageEntity { ImageSource = GameGlobal.PictrueSource }); //} }