Пример #1
0
    // Banner Ad

    public void OnToggleBannerAd()
    {
        // Hide a banner ad if it's already visible

        if (_isBannerAdShown)
        {
            _isBannerAdShown = false;
            Enhance.HideBannerAd();
            writeLog("Hiding banner ad");
            return;
        }

        // The ad isn't visible, check whether it's available

        if (!Enhance.IsBannerAdReady())
        {
            writeLog("Banner ad is not ready");
            return;
        }

        // The ad is available, display it

        Enhance.ShowBannerAdWithPosition(Enhance.Position.BOTTOM);
        _isBannerAdShown = true;
        writeLog("Showing banner ad");

        // This will show our ad at the bottom of the screen
        // You can also change the position to Enhance.Position.TOP
    }
Пример #2
0
 /**
  * Hide banner ad
  */
 public static void HideBannerAd()
 {
     Enhance.HideBannerAd();
 }