Example #1
0
        private static void RewardedAdDidOpenCallback(IntPtr rewardedAdClient)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(rewardedAdClient);

            if (client.OnAdOpening != null)
            {
                client.OnAdOpening(client, EventArgs.Empty);
            }
        }
Example #2
0
        private static void RewardedAdDidReceiveAdCallback(IntPtr rewardedAdClient)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(rewardedAdClient);

            if (client.OnAdLoaded != null)
            {
                client.OnAdLoaded(client, EventArgs.Empty);
            }
        }
Example #3
0
        private static void AdDidRecordImpressionCallback(IntPtr rewardedAdClient)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(rewardedAdClient);

            if (client.OnAdDidRecordImpression != null)
            {
                client.OnAdDidRecordImpression(client, EventArgs.Empty);
            }
        }
Example #4
0
        private static void AdDidDismissFullScreenContentCallback(IntPtr rewardedAdClient)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(rewardedAdClient);

            if (client.OnAdDidDismissFullScreenContent != null)
            {
                client.OnAdDidDismissFullScreenContent(client, EventArgs.Empty);
            }
        }
Example #5
0
        private static void AdFailedToPresentFullScreenContentCallback(IntPtr rewardedAdClient, IntPtr error)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(rewardedAdClient);

            if (client.OnAdFailedToPresentFullScreenContent != null)
            {
                AdErrorClientEventArgs args = new AdErrorClientEventArgs()
                {
                    AdErrorClient = new AdErrorClient(error)
                };
                client.OnAdFailedToPresentFullScreenContent(client, args);
            }
        }
Example #6
0
        private static void RewardedAdDidFailToShowAdWithErrorCallback(
            IntPtr rewardedAdClient, string error)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(rewardedAdClient);

            if (client.OnAdFailedToShow != null)
            {
                AdErrorEventArgs args = new AdErrorEventArgs()
                {
                    Message = error
                };
                client.OnAdFailedToShow(client, args);
            }
        }
        private static void RewardedAdDidFailToReceiveAdWithErrorCallback(
            IntPtr rewardedAdClient, IntPtr error)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(rewardedAdClient);

            if (client.OnAdFailedToLoad != null)
            {
                LoadAdErrorClientEventArgs args = new LoadAdErrorClientEventArgs()
                {
                    LoadAdErrorClient = new LoadAdErrorClient(error)
                };
                client.OnAdFailedToLoad(client, args);
            }
        }
Example #8
0
        private static void RewardedAdDidFailToShowAdWithErrorCallback(
            IntPtr rewardedAdClient, IntPtr error)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(rewardedAdClient);

            if (client.OnAdFailedToShow != null)
            {
                AdErrorClientEventArgs args = new AdErrorClientEventArgs()
                {
                    AdErrorClient = new AdErrorClient(error),
                    Message       = Externs.GADUGetAdErrorMessage(error)
                };
                client.OnAdFailedToShow(client, args);
            }
        }
Example #9
0
        private static void RewardedAdUserDidEarnRewardCallback(
            IntPtr rewardedAdClient, string rewardType, double rewardAmount)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(
                rewardedAdClient);

            if (client.OnUserEarnedReward != null)
            {
                Reward args = new Reward()
                {
                    Type   = rewardType,
                    Amount = rewardAmount
                };
                client.OnUserEarnedReward(client, args);
            }
        }
Example #10
0
        private static void RewardedAdPaidEventCallback(
            IntPtr rewardedAdClient, int precision, long value, string currencyCode)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(rewardedAdClient);

            if (client.OnPaidEvent != null)
            {
                AdValue adValue = new AdValue()
                {
                    Precision    = (AdValue.PrecisionType)precision,
                    Value        = value,
                    CurrencyCode = currencyCode
                };
                AdValueEventArgs args = new AdValueEventArgs()
                {
                    AdValue = adValue
                };

                client.OnPaidEvent(client, args);
            }
        }