public void CacheAd(AdNetwork network, DisplayedAdType displayType, CBLocation location) { #if ADFREE // Don't cache if Ad-free return; #endif if (Debug.isDebugBuild) { Debug.Log("Caching ad"); } switch (displayType) { case DisplayedAdType.FullScreen: #if !MOREAPPSONLY switch (network) { case AdNetwork.ChartBoost: default: Chartboost.cacheInterstitial(location); break; } #endif break; case DisplayedAdType.MoreGames: switch (network) { case AdNetwork.ChartBoost: default: Chartboost.cacheMoreApps(location); break; } break; case DisplayedAdType.Video: switch (network) { case AdNetwork.ChartBoost: default: Chartboost.cacheRewardedVideo(location); break; } break; } }
/// <summary> /// Gets the data privacy consent status for the specified ad network. /// </summary> /// <returns>The data privacy consent.</returns> /// <param name="adNetwork">Ad network.</param> public static ConsentStatus GetDataPrivacyConsent(AdNetwork adNetwork) { return(GetAdClient(adNetwork).DataPrivacyConsent); }
/// <summary> /// Revokes the provider-level data privacy consent of the specified ad network. /// </summary> /// <param name="adNetwork">Ad network.</param> public static void RevokeDataPrivacyConsent(AdNetwork adNetwork) { GetAdClient(adNetwork).RevokeDataPrivacyConsent(); }
/// <summary> /// Grants the provider-level data privacy consent for the specified ad network. /// </summary> /// <param name="adNetwork">Ad network.</param> public static void GrantDataPrivacyConsent(AdNetwork adNetwork) { // Use GetAdClient so the client won't be initialized (until it's actually used). // This is necessary as the consent should be set prior initialization for most networks. GetAdClient(adNetwork).GrantDataPrivacyConsent(); }
public bool IsActiveMediationNetwork(AdNetwork net) { return(settingsBridge.CallStatic <bool>("isActiveMediationNetwork", (int)net)); }
public void ShowAd(AdNetwork network, DisplayedAdType displayType, CBLocation location) { #if ADFREE // Don't show Ad if Ad-free return; #endif CurrentInterval++; if (CurrentInterval % this.AdDisplayInterval != 0 && displayType == DisplayedAdType.FullScreen) { if (Debug.isDebugBuild) { Debug.Log("Can't display Ad yet: " + CurrentInterval.ToString()); } // Don't display until every interval return; } if (Debug.isDebugBuild) { Debug.Log("Showing Ad"); } switch (displayType) { case DisplayedAdType.FullScreen: #if !MOREAPPSONLY switch (network) { case AdNetwork.ChartBoost: default: Chartboost.showInterstitial(location); break; } #endif break; case DisplayedAdType.MoreGames: switch (network) { case AdNetwork.ChartBoost: default: Chartboost.showMoreApps(location); break; } break; case DisplayedAdType.Video: switch (network) { case AdNetwork.ChartBoost: default: Chartboost.showRewardedVideo(location); break; } break; } }
public static bool IsActiveNetwork(AdNetwork network) { return(CASFactory.IsActiveNetwork(network)); }
public string GetApiKey(AdNetwork adNetwork) { return((string)apiKeys[adNetwork]); }
public static string GetExtraKeyGDPR(this AdNetwork network) { return(network.GetTag() + "_gdpr"); }
public static string GetExtraKeyCCPA(this AdNetwork network) { return(network.GetTag() + "_ccpa"); }
public void ShowAd(AdNetwork network, DisplayedAdType displayType, CBLocation location) { #if ADFREE // Don't show Ad if Ad-free return; #endif CurrentInterval++; if (CurrentInterval % this.AdDisplayInterval != 0 && displayType == DisplayedAdType.FullScreen) { if (Debug.isDebugBuild) { Debug.Log("Can't display Ad yet: " + CurrentInterval.ToString()); } // Don't display until every interval return; } if (Debug.isDebugBuild) { Debug.Log("Showing Ad"); } switch (displayType) { case DisplayedAdType.FullScreen: #if !MOREAPPSONLY switch (network) { case AdNetwork.ChartBoost: default: Chartboost.showInterstitial(location); break; } #endif break; case DisplayedAdType.MoreGames: switch (network) { case AdNetwork.ChartBoost: default: Chartboost.showMoreApps(location); break; } break; case DisplayedAdType.Video: switch (network) { case AdNetwork.ChartBoost: default: Chartboost.showRewardedVideo(location); break; } break; } }
public Dependency(AdNetwork network) { this.name = network.GetName(); }
bool IsPluginAvail(AdNetwork adNetwork) { switch (adNetwork) { case AdNetwork.AdColony: #if EM_ADCOLONY return(true); #else return(false); #endif case AdNetwork.AdMob: #if EM_ADMOB return(true); #else return(false); #endif case AdNetwork.Chartboost: #if EM_CHARTBOOST return(true); #else return(false); #endif case AdNetwork.AudienceNetwork: #if EM_FBAN return(true); #else return(false); #endif case AdNetwork.Heyzap: #if EM_HEYZAP return(true); #else return(false); #endif case AdNetwork.MoPub: #if EM_MOPUB return(true); #else return(false); #endif case AdNetwork.IronSource: #if EM_IRONSOURCE return(true); #else return(false); #endif case AdNetwork.TapJoy: #if EM_TAPJOY return(true); #else return(false); #endif case AdNetwork.UnityAds: #if UNITY_ADS return(true); #else return(false); #endif case AdNetwork.None: return(true); default: return(false); } }
private float GetPopupDelayTime(AdNetwork network) { return(0f); }
void ShowAds(AdNetwork network) { StartCoroutine(ShowingAds(network)); }
public void SetApiKey(AdNetwork adNetwork, string apiKey) { apiKeys[adNetwork] = apiKey; }
public bool IsCached(AdNetwork network, DisplayedAdType displayType, CBLocation location) { bool isCached = false; #if ADFREE // Just return false if Ad-free return false; #endif switch (displayType) { case DisplayedAdType.FullScreen: #if !MOREAPPSONLY switch (network) { case AdNetwork.ChartBoost: default: isCached = Chartboost.hasInterstitial(location); break; } #endif break; case DisplayedAdType.MoreGames: switch (network) { case AdNetwork.ChartBoost: default: isCached = Chartboost.hasMoreApps(location); break; } break; case DisplayedAdType.Video: switch (network) { case AdNetwork.ChartBoost: default: isCached = Chartboost.hasRewardedVideo(location); break; } break; } if (Debug.isDebugBuild) { Debug.Log("Ad is cached: " + isCached.ToString()); } return isCached; }
public string GetUnitId(AdNetwork adNetwork, AdType adType) { Hashtable network = (Hashtable)unitIds[adNetwork]; return((string)network[adType]); }
private static string GetNetworkTag(AdNetwork network) { switch (network) { case AdNetwork.GoogleAds: return("AM"); case AdNetwork.Vungle: return("V"); case AdNetwork.Kidoz: return("K"); case AdNetwork.Chartboost: return("CB"); case AdNetwork.UnityAds: return("U"); case AdNetwork.AppLovin: return("AL"); case AdNetwork.SuperAwesome: return("SuA"); case AdNetwork.StartApp: return("StA"); case AdNetwork.AdColony: return("AC"); case AdNetwork.FacebookAN: return("FB"); case AdNetwork.InMobi: return("IM"); case AdNetwork.MobFox: return("MF"); case AdNetwork.MyTarget: return("MT"); case AdNetwork.CrossPromotion: return("P"); case AdNetwork.IronSource: return("IS"); case AdNetwork.YandexAds: return("Ya"); case AdNetwork.OwnVAST: return("Own"); case AdNetwork.AmazonAds: return("AZ"); case AdNetwork.Verizon: return("VZ"); case AdNetwork.MoPub: return("MP"); case AdNetwork.Tapjoy: return("TJ"); case AdNetwork.Fyber: case AdNetwork.FairBid: return("Fy"); case AdNetwork.Mintegral: return("MB"); default: return(string.Empty); } }