public void AppOpenAdLoadCompletionHandler(AppOpenAd ad, NSError error) { if (error != null) { System.Diagnostics.Debug.WriteLine($"error: {error}"); } else { ad.Delegate = new MyFullScreenContentDelegate(); InvokeOnMainThread(() => ad.PresentFromRootViewController(navController)); } }
public override void OnAppOpenAdLoaded(AppOpenAd ad) { try { base.OnAppOpenAdLoaded(ad); LastAdFetchTime = Methods.Time.CurrentTimeMillis(); Ad = ad; } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
public void FetchAd() { try { if (IsAdAvailable()) { return; } AdRequest request = new AdRequest.Builder().Build(); AppOpenAd.Load(MostCurrentActivity, AppSettings.AdAdMobAppOpenKey, request, AppOpenAd.AppOpenAdOrientationPortrait, this); } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }
public override void OnAppOpenAdLoaded(AppOpenAd appOpenAd) { Show(appOpenAd); }
public void Show(AppOpenAd appOpenAd) { appOpenAd.Show(activity, new FullScreenContentCallback()); }
public void Fetch() { var adRequest = new AdRequest.Builder().Build(); AppOpenAd.Load(Context, "ca-app-pub-9927527797473679/6279632383", adRequest, AppOpenAd.AppOpenAdOrientationPortrait, this); }
void AddAppOpenAd() { AppOpenAd.Load("ca-app-pub-3940256099942544/5662855259", Request.GetDefaultRequest(), UIInterfaceOrientation.Portrait, AppOpenAdLoadCompletionHandler); }