Ejemplo n.º 1
0
        public static AdMobRewardedVideo Ad_RewardedVideo(Activity context)
        {
            try
            {
                if (AppSettings.ShowAdMobRewardVideo)
                {
                    if (CountRewarded == AppSettings.ShowAdMobRewardedVideoCount)
                    {
                        CountRewarded = 0;
                        AdMobRewardedVideo ads = new AdMobRewardedVideo();
                        ads.ShowAd(context);
                        return(ads);
                    }
                    else
                    {
                        AdsFacebook.InitRewardVideo(context);
                    }

                    CountRewarded++;
                }
                else
                {
                    AdsFacebook.InitRewardVideo(context);
                }
                return(null !);
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
                return(null !);
            }
        }
Ejemplo n.º 2
0
        public static AdMobRewardedVideo Ad_RewardedVideo(Activity context)
        {
            try
            {
                var isPro = ListUtils.MyUserInfoList.FirstOrDefault()?.IsPro ?? 0;
                if (isPro == 0 && AppSettings.ShowAdMobRewardVideo)
                {
                    if (CountRewarded == AppSettings.ShowAdMobRewardedVideoCount)
                    {
                        CountRewarded = 0;
                        AdMobRewardedVideo ads = new AdMobRewardedVideo();
                        ads.ShowAd(context);
                        return(ads);
                    }
                    else
                    {
                        AdsFacebook.InitRewardVideo(context);
                    }

                    CountRewarded++;
                }
                else
                {
                    AdsFacebook.InitRewardVideo(context);
                }

                return(null);
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
                return(null);
            }
        }
Ejemplo n.º 3
0
        public static AdMobRewardedVideo Ad_RewardedVideo(Activity context)
        {
            try
            {
                if (AppSettings.ShowAdMobRewardVideo)
                {
                    if (CountRewarded == AppSettings.ShowAdMobRewardedVideoCount)
                    {
                        CountRewarded = 0;
                        AdMobRewardedVideo ads = new AdMobRewardedVideo();
                        ads.ShowAd(context);
                        return(ads);
                    }
                    else
                    {
                        AdsFacebook.InitRewardVideo(context);
                    }

                    CountRewarded++;
                }
                else
                {
                    AdsFacebook.InitRewardVideo(context);
                }
                return(null);
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
                return(null);
            }
        }
Ejemplo n.º 4
0
        public static AdMobRewardedVideo Ad_RewardedVideo(Activity context)
        {
            try
            {
                switch (AppSettings.ShowAdMobRewardVideo)
                {
                case true when CountRewarded == AppSettings.ShowAdMobRewardedVideoCount:
                {
                    CountRewarded = 0;
                    AdMobRewardedVideo ads = new AdMobRewardedVideo();
                    ads.ShowAd(context);
                    return(ads);
                }

                case true:
                    Ad_RewardedInterstitial(context);
                    break;

                default:
                    Ad_RewardedInterstitial(context);
                    break;
                }

                return(null !);
            }
            catch (Exception exception)
            {
                Methods.DisplayReportResultTrack(exception);
                return(null !);
            }
        }
Ejemplo n.º 5
0
        public static void Ad_RewardedVideo(Context context)
        {
            try
            {
                if (AppSettings.ShowAdMobRewardVideo)
                {
                    if (CountRewarded == AppSettings.ShowAdMobRewardedVideoCount)
                    {
                        CountRewarded = 0;
                        AdMobRewardedVideo ads = new AdMobRewardedVideo();
                        ads.ShowAd(context);
                    }

                    CountRewarded++;
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }