/// <summary> /// Requests an AdColonyInterstitial. /// </summary> /// This method returns immediately, before the ad request completes. /// If the request is successful, an AdColonyInterstitial object will be passed to the success block. /// If the request is unsuccessful, the failure block will be called and an AdColonyAdRequestError will be passed to the handler. /// <param name="zoneId">The zone identifier string indicating which zone the ad request is for.</param> /// <param name="adOptions">An AdOptions object used to set configurable aspects of the ad request.</param> /// <see cref="AdOptions" /> /// <see cref="InterstitialAd" /> /// <see cref="OnRequestInterstitial" /> /// <see cref="OnRequestInterstitialFailedWithZone" /> public static void RequestInterstitialAd(string zoneId, AdOptions adOptions) { if (IsInitialized()) { SharedInstance.RequestInterstitialAd(zoneId, adOptions); } }
void RequestBannerAd2() { AdColony.AdOptions adOptions = new AdColony.AdOptions(); AdColony.Ads.RequestAdView(Constants.AdViewZoneID, AdColony.AdSize.Banner, AdColony.AdPosition.Center, adOptions); AdColony.Ads.RequestAdView(Constants.AdViewZoneID, AdColony.AdSize.Banner, AdColony.AdPosition.Bottom, adOptions); }
private void RequestAd() { DebugText.text = "Ads Being Request"; AdColony.AdOptions adOptions = new AdColony.AdOptions(); adOptions.ShowPostPopup = false; adOptions.ShowPrePopup = false; AdColony.Ads.RequestInterstitialAd(SystemConfig.Instance.AdcolonyZoneId, adOptions); intEvenetHandler(); }
public void RequestInterstitialAd(string zoneId, AdOptions options) { string optionsJson = null; if (options != null) { optionsJson = options.ToJsonString(); } _AdcRequestInterstitialAd(zoneId, optionsJson); }
void RequestAd() { // Request an ad. Debug.Log("**** Request Ad ****"); AdColony.AdOptions adOptions = new AdColony.AdOptions(); adOptions.ShowPrePopup = true; adOptions.ShowPostPopup = true; AdColony.Ads.RequestInterstitialAd(Constants.CurrencyZoneID, adOptions); }
public void RequestInterstitialAd(string zoneId, AdOptions adOptions) { Hashtable values = new Hashtable(); values["zone_id"] = zoneId; if (adOptions != null) { values["ad_options"] = adOptions.ToHashtable(); } string json = AdColonyJson.Encode(values); _pluginWrapper.CallStatic("requestInterstitialAd", json); }
void RequestRewardedAd() { #if (UNITY_ANDROID || UNITY_IOS) AdColony.AdOptions adOptions = new AdColony.AdOptions(); adOptions.ShowPrePopup = true; adOptions.ShowPostPopup = true; if (AdsReady) { AdColony.Ads.RequestInterstitialAd(zoneIds[1], adOptions); } #else Debug.LogWarning("Ads not supported on this platform"); #endif }
void RequestBannerAd() { AdColony.AdOptions adOptions = new AdColony.AdOptions(); if (counter == 1) { AdColony.Ads.RequestAdView(Constants.AdViewZoneID, AdColony.AdSize.Banner, AdColony.AdPosition.Bottom, adOptions); counter = 2; } else if (counter == 2) { AdColony.Ads.RequestAdView(Constants.AdViewZoneID, AdColony.AdSize.Banner, AdColony.AdPosition.TopLeft, adOptions); counter = 3; } else if (counter == 3) { AdColony.Ads.RequestAdView(Constants.AdViewZoneID, AdColony.AdSize.Banner, AdColony.AdPosition.TopRight, adOptions); counter = 4; } else if (counter == 4) { AdColony.Ads.RequestAdView(Constants.AdViewZoneID, AdColony.AdSize.Banner, AdColony.AdPosition.BottomLeft, adOptions); counter = 5; } else if (counter == 5) { AdColony.Ads.RequestAdView(Constants.AdViewZoneID, AdColony.AdSize.Banner, AdColony.AdPosition.BottomRight, adOptions); counter = 6; } else if (counter == 6) { AdColony.Ads.RequestAdView(Constants.AdViewZoneID, AdColony.AdSize.Banner, AdColony.AdPosition.Center, adOptions); counter = 7; } else { AdColony.Ads.RequestAdView(Constants.AdViewZoneID, AdColony.AdSize.Banner, AdColony.AdPosition.Top, adOptions); counter = 1; } }
public void RequestAd(string zoneId = null) { if (zoneId == null) { zoneId = Constants.AdColonyInterstitialZoneID; } AdColony.InterstitialAd _ad = AdForZoneId(zoneId); if (_ad != null && _ad.Expired == false) // we have an active ad for this zone, do not ask for another { return; } // Request an ad. MyDebug.Log("Request Ad zone: " + zoneId); AdColony.AdOptions adOptions = new AdColony.AdOptions(); adOptions.ShowPrePopup = false; adOptions.ShowPostPopup = false; AdColony.Ads.RequestInterstitialAd(zoneId, adOptions); }
public static void RequestAdView(string zoneId, AdSize adSize, AdPosition adPosition, AdOptions adOptions) { if (Ads.IsInitialized()) { SharedInstance.RequestAdView(zoneId, adSize, adPosition, adOptions); } }
public void RequestAdView(string zoneId, AdSize adSize, AdPosition adPosition, AdOptions adOptions) { Hashtable values = new Hashtable(); values["zone_id"] = zoneId; values["ad_size"] = (Int32)adSize; values["ad_position"] = (Int32)adPosition; if (adOptions != null) { values["ad_options"] = adOptions.ToHashtable(); } string json = AdColonyJson.Encode(values); _pluginWrapper.CallStatic("requestAdView", json); }
public void RequestAdView(string zoneId, AdSize adSize, AdPosition adPosition, AdOptions adOptions) { string optionsJson = null; if (adOptions != null) { optionsJson = adOptions.ToJsonString(); } _AdcRequestAdView(zoneId, adSize, adPosition, optionsJson); }