I am hoping you guys can help me as I dont have much more hair to lose. I dont think this is a monogame issue, but I have written a class to display an InterstitialAd and all works perfect for ads which are just closed and do not have any video content in when clicked. As soon as there is video in an ad when you return to the game you get a black blank ad with no close below is the code
using System;
using System.Collections.Generic;
using System.Text;
using FusionFrameWork.ScreenSystem;
#if WINDOWS_PHONE
using GoogleAds;
#endif
#if __ANDROID__
using Android.Gms.Ads;
using Android.Content;
#endif
namespace FusionFrameWork.Helpers
{
public class FullPageAdvert
{
public bool PageAdsDisplayed { get; set; }
#if WINDOWS_PHONE
const string AD_ID = "ca-app-pub-1223188343191718/3624796783";
#endif
#if !__iOS__
private InterstitialAd _currentPageAd;
#endif
#if WINDOWS_PHONE
public FullPageAdvert()
{
_currentPageAd = new InterstitialAd (AD_ID);
_currentPageAd.FailedToReceiveAd += interstitialAd_FailedToReceiveAd;
_currentPageAd.ReceivedAd += OnPageAdReceived;
_currentPageAd.DismissingOverlay += OnPageAdClosed;
_currentPageAd.LeavingApplication += OnPageAdClicked;
AdRequest adRequest = new AdRequest ();
adRequest.ForceTesting = true;
_currentPageAd.LoadAd (adRequest);
PageAdsDisplayed = true;
}
#elif __ANDROID__
public FullPageAdvert(Context CurrentContext)
{
_currentPageAd = new InterstitialAd(CurrentContext);
_currentPageAd.AdUnitId = "ca-app-pub-1223188343191718/3585940787";
var request = new AdRequest.Builder()
.Build();
//intAdView.LoadAd(request);
var listener = new adlistener();
listener.AdFailedToLoad += new adlistener.AdFailedToLoadEvent(interstitialAd_FailedToReceiveAd);
listener.AdClosed += new adlistener.AdClosedEvent(interstitialAd_OnPageAdClosed);
listener.AdOpened += new adlistener.AdOpenedEvent (interstitialAd_OnPageAdOpened);
listener.AdLoaded += new adlistener.AdLoadedEvent(interstitialAd_OnPageAdLoaded);
_currentPageAd.AdListener = listener;
// Start loading the ad now so that it is ready by the time the user is ready to go to
// the next level.
_currentPageAd.LoadAd(request);
PageAdsDisplayed = true;
// Optionally populate the ad request builder.
}
#endif
#if WINDOWS_PHONE
private void interstitialAd_FailedToReceiveAd(object sender, AdErrorEventArgs e)
{
System.Diagnostics.Debug.WriteLine("Interstitial failed");
PageAdsDisplayed = false;
}
private void OnPageAdReceived(object sender, AdEventArgs e)
{
System.Diagnostics.Debug.WriteLine("Ad received successfully");
_currentPageAd.ShowAd();
}
private void OnPageAdClosed(object sender, AdEventArgs e)
{
PageAdsDisplayed = false;
_currentPageAd = null;
}
private void OnPageAdClicked(object sender, AdEventArgs e)
{
PageAdsDisplayed = false;
}
#elif __ANDROID__
public virtual void interstitialAd_FailedToReceiveAd()
{
System.Diagnostics.Debug.WriteLine("Interstitial failed");
PageAdsDisplayed = false;
}
private void interstitialAd_OnPageAdLoaded()
{
System.Diagnostics.Debug.WriteLine("Ad received successfully");
_currentPageAd.Show ();
}
private void interstitialAd_OnPageAdClosed()
{
_currentPageAd.Dispose ();
PageAdsDisplayed = false;
}
#endif
}
}
All help greatly received