Skip to content

Instantly share code, notes, and snippets.

@rtroe
Created March 17, 2018 00:39
Show Gist options
  • Save rtroe/cd56bb7565eb7b17b3f77892ce555be3 to your computer and use it in GitHub Desktop.
Save rtroe/cd56bb7565eb7b17b3f77892ce555be3 to your computer and use it in GitHub Desktop.
/// <summary>
/// Adds the initerstialel ad.
/// </summary>
/// <param name="adUnitID">Ad unit identifier.</param>
public void InitIniterstialelAd(string adUnitID)
{
this.AdUnitID = adUnitID;
#if __ANDROID__
try
{
mInterstitialAd.AdUnitId = adUnitID;
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
mInterstitialAd.AdListener = new AdListener();
#elif __IOS__
// Intersitials must be re-instantiated each time
// the ad's are loaded.
#endif
LoadIniterstialelAd();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment