示例#1
0
 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));
     }
 }
示例#2
0
            public override void OnAppOpenAdLoaded(AppOpenAd ad)
            {
                try
                {
                    base.OnAppOpenAdLoaded(ad);

                    LastAdFetchTime = Methods.Time.CurrentTimeMillis();
                    Ad = ad;
                }
                catch (Exception e)
                {
                    Methods.DisplayReportResultTrack(e);
                }
            }
示例#3
0
            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);
                }
            }
示例#4
0
 public override void OnAppOpenAdLoaded(AppOpenAd appOpenAd)
 {
     Show(appOpenAd);
 }
示例#5
0
 public void Show(AppOpenAd appOpenAd)
 {
     appOpenAd.Show(activity, new FullScreenContentCallback());
 }
示例#6
0
        public void Fetch()
        {
            var adRequest = new AdRequest.Builder().Build();

            AppOpenAd.Load(Context, "ca-app-pub-9927527797473679/6279632383", adRequest, AppOpenAd.AppOpenAdOrientationPortrait, this);
        }
示例#7
0
 void AddAppOpenAd()
 {
     AppOpenAd.Load("ca-app-pub-3940256099942544/5662855259", Request.GetDefaultRequest(), UIInterfaceOrientation.Portrait, AppOpenAdLoadCompletionHandler);
 }