DeltaDNAAds.InterstitialAd.Create C# (CSharp) Method

Create() public static method

public static Create ( ) : InterstitialAd
return InterstitialAd
        public static InterstitialAd Create()
        {
            if (!DDNASmartAds.Instance.IsInterstitialAdAllowed(null)) return null;

            var instance = new InterstitialAd();
            instance.Parameters = new JSONObject();
            return instance;
        }

Same methods

InterstitialAd::Create ( Engagement engagement ) : InterstitialAd

Usage Example

Example #1
0
        public void OnInterstitialWithEngageBtn_Clicked()
        {
            var engagement = new Engagement("showInterstitial");

            DDNA.Instance.RequestEngagement(engagement, response => {
                var interstitialAd = InterstitialAd.Create(response);

                if (interstitialAd != null)   // Engagement didn't prevent ad from showing
                {
                    interstitialAd.OnInterstitialAdOpened += () => {
                        Debug.Log("Interstitial Ad opened its ad.");
                    };

                    interstitialAd.OnInterstitialAdFailedToOpen += (reason) => {
                        Debug.Log("Interstitial Ad failed to open its ad: " + reason);
                    };

                    interstitialAd.OnInterstitialAdClosed += () => {
                        Debug.Log("Interstitial Ad closed its ad.");
                    };

                    interstitialAd.Show();
                }
                else
                {
                    Debug.Log("Engage disabled the interstitial ad from showing.");
                }
            }, exception => {
                Debug.Log("Engage encountered an error: " + exception.Message);
            });
        }
All Usage Examples Of DeltaDNAAds.InterstitialAd::Create