public void ShowAdIfAvailable(FullScreenContentCallback listener) { try { switch (IsShowingAd) { case true: //Can't show the ad: Already showing the ad return; } if (!IsAdAvailable()) { //Can't show the ad: Ad not available FetchAd(); return; } Ad.Show(MostCurrentActivity, new MyFullScreenContentCallback(this, listener)); } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
public MyFullScreenContentCallback(AppOpenManager appOpenManager, FullScreenContentCallback listener) { try { Listener = listener; AppOpenAdManager = appOpenManager; } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }