Esempio n. 1
0
 public bool IsInterstialReady(string adUnitId)
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         return(value.IsInterstitialReady);
     }
     MoPubBase.ReportAdUnitNotFound(adUnitId);
     return(false);
 }
Esempio n. 2
0
 public static bool HasRewardedVideo(string adUnitId)
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         return(value.HasRewardedVideo());
     }
     MoPubBase.ReportAdUnitNotFound(adUnitId);
     return(false);
 }
Esempio n. 3
0
 public bool IsInterstialReady(string adUnitId)
 {
     if (InterstitialPluginsDict.TryGetValue(adUnitId, out MoPubAndroidInterstitial interstitial))
     {
         return(interstitial.IsInterstitialReady);
     }
     MoPubBase.ReportAdUnitNotFound(adUnitId);
     return(false);
 }
Esempio n. 4
0
 public static List <MoPubBase.Reward> GetAvailableRewards(string adUnitId)
 {
     if (RewardedVideoPluginsDict.TryGetValue(adUnitId, out MoPubAndroidRewardedVideo video))
     {
         return(video.GetAvailableRewards());
     }
     MoPubBase.ReportAdUnitNotFound(adUnitId);
     return(null);
 }
Esempio n. 5
0
 public static bool HasRewardedVideo(string adUnitId)
 {
     if (RewardedVideoPluginsDict.TryGetValue(adUnitId, out MoPubAndroidRewardedVideo video))
     {
         return(video.HasRewardedVideo());
     }
     MoPubBase.ReportAdUnitNotFound(adUnitId);
     return(false);
 }
Esempio n. 6
0
 public void SetAutorefresh(string adUnitId, bool enabled)
 {
     if (BannerPluginsDict.TryGetValue(adUnitId, out MoPubAndroidBanner banner))
     {
         banner.SetAutorefresh(enabled);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 7
0
 public static void SelectReward(string adUnitId, MoPubBase.Reward selectedReward)
 {
     if (RewardedVideoPluginsDict.TryGetValue(adUnitId, out MoPubAndroidRewardedVideo video))
     {
         video.SelectReward(selectedReward);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 8
0
 public static void SelectReward(string adUnitId, Reward selectedReward)
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         value.SelectedReward = selectedReward;
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 9
0
 public void SetAutorefresh(string adUnitId, bool enabled)
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         value.SetAutorefresh(enabled);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 10
0
 public static void CreateBanner(string adUnitId, AdPosition position)
 {
     if (BannerPluginsDict.TryGetValue(adUnitId, out MoPubAndroidBanner value))
     {
         value.CreateBanner(position);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 11
0
 public static void RequestRewardedVideo(string adUnitId, List <MediationSetting> mediationSettings = null, string keywords = null, string userDataKeywords = null, double latitude = 99999.0, double longitude = 99999.0, string customerId = null)
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         value.RequestRewardedVideo(mediationSettings, keywords, userDataKeywords, latitude, longitude, customerId);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 12
0
 public static void DestroyBanner(string adUnitId)
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         value.DestroyBanner();
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 13
0
 public void DestroyInterstitialAd(string adUnitId)
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         value.DestroyInterstitialAd();
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 14
0
 public static void RequestInterstitialAd(string adUnitId, string keywords = "", string userDataKeywords = "")
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         value.RequestInterstitialAd(keywords, userDataKeywords);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 15
0
 public static void ShowBanner(string adUnitId, bool shouldShow)
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         value.ShowBanner(shouldShow);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 16
0
 public static void DestroyBanner(string adUnitId)
 {
     if (BannerPluginsDict.TryGetValue(adUnitId, out MoPubAndroidBanner banner))
     {
         banner.DestroyBanner();
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 17
0
 public static void RefreshBanner(string adUnitId, string keywords, string userDataKeywords = "")
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         value.RefreshBanner(keywords, userDataKeywords);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 18
0
 public static void ShowInterstitialAd(string adUnitId)
 {
     if (InterstitialPluginsDict.TryGetValue(adUnitId, out MoPubAndroidInterstitial value))
     {
         value.ShowInterstitialAd();
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 19
0
 public static void CreateBanner(string adUnitId, AdPosition position, BannerType bannerType = BannerType.Size320x50)
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         value.CreateBanner(bannerType, position);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 20
0
 public void DestroyInterstitialAd(string adUnitId)
 {
     if (InterstitialPluginsDict.TryGetValue(adUnitId, out MoPubAndroidInterstitial interstitial))
     {
         interstitial.DestroyInterstitialAd();
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 21
0
 public static void ShowRewardedVideo(string adUnitId, string customData = null)
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         value.ShowRewardedVideo(customData);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 22
0
 public void ForceRefresh(string adUnitId)
 {
     if (PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
     {
         value.ForceRefresh();
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 23
0
 public static void RequestRewardedVideo(string adUnitId, List <MoPubBase.LocalMediationSetting> mediationSettings = null, string keywords = null, string userDataKeywords = null, double latitude = 99999.0, double longitude = 99999.0, string customerId = null)
 {
     MoPubLog.Log("RequestRewardedVideo", "Attempting to load ad", Array.Empty <object>());
     if (RewardedVideoPluginsDict.TryGetValue(adUnitId, out MoPubAndroidRewardedVideo video))
     {
         video.RequestRewardedVideo(mediationSettings, keywords, userDataKeywords, latitude, longitude, customerId);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 24
0
    public static List <Reward> GetAvailableRewards(string adUnitId)
    {
        if (!PluginsDict.TryGetValue(adUnitId, out MoPubBinding value))
        {
            MoPubBase.ReportAdUnitNotFound(adUnitId);
            return(null);
        }
        List <Reward> availableRewards = value.GetAvailableRewards();

        UnityEngine.Debug.Log($"GetAvailableRewards found {availableRewards.Count} rewards for ad unit {adUnitId}");
        return(availableRewards);
    }
Esempio n. 25
0
 public static void CreateBanner(string adUnitId, MoPubBase.AdPosition position)
 {
     MoPubLog.Log("CreateBanner", "Attempting to load ad", Array.Empty <object>());
     if (BannerPluginsDict.TryGetValue(adUnitId, out MoPubAndroidBanner banner))
     {
         banner.CreateBanner(position);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 26
0
 public void ForceRefresh(string adUnitId)
 {
     MoPubLog.Log("ForceRefresh", "Attempting to show ad", Array.Empty <object>());
     if (BannerPluginsDict.TryGetValue(adUnitId, out MoPubAndroidBanner banner))
     {
         banner.ForceRefresh();
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 27
0
 public static void RequestInterstitialAd(string adUnitId, string keywords = "", string userDataKeywords = "")
 {
     MoPubLog.Log("RequestInterstitialAd", "Attempting to load ad", Array.Empty <object>());
     if (InterstitialPluginsDict.TryGetValue(adUnitId, out MoPubAndroidInterstitial interstitial))
     {
         interstitial.RequestInterstitialAd(keywords, userDataKeywords);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 28
0
 public static void ShowInterstitialAd(string adUnitId)
 {
     MoPubLog.Log("ShowInterstitialAd", "Attempting to show ad", Array.Empty <object>());
     if (InterstitialPluginsDict.TryGetValue(adUnitId, out MoPubAndroidInterstitial interstitial))
     {
         interstitial.ShowInterstitialAd();
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 29
0
 public static void ShowBanner(string adUnitId, bool shouldShow)
 {
     MoPubLog.Log("ShowBanner", "Attempting to show ad", Array.Empty <object>());
     if (BannerPluginsDict.TryGetValue(adUnitId, out MoPubAndroidBanner banner))
     {
         banner.ShowBanner(shouldShow);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }
Esempio n. 30
0
 public static void ShowRewardedVideo(string adUnitId, string customData = null)
 {
     MoPubLog.Log("ShowRewardedVideo", "Attempting to show ad", Array.Empty <object>());
     if (RewardedVideoPluginsDict.TryGetValue(adUnitId, out MoPubAndroidRewardedVideo video))
     {
         video.ShowRewardedVideo(customData);
     }
     else
     {
         MoPubBase.ReportAdUnitNotFound(adUnitId);
     }
 }