public void OnAdRequestStarted(VisxAdManager visxAdManager)
        {
            Console.WriteLine("Xamarin.Android.Layer.Universal ---> OnAdRequestStarted()");

            /// Setting maxSizeHeight for the visible parent view where Vis.X Ad is located
            /// Needed for setting the ad frame how much can expand in height on screen
            _visxAdManagerUniversal.SetMaxSizeHeight(MainActivity.MaxSizeHeight);
        }
 private void DisplayAd(VisxAdManager visxAdManager)
 {
     /// Adding Vis.X Banner/Video Ad to the created Android
     /// native View and invoced on the main Xamarin thread
     Android.Widget.RelativeLayout container = new Android.Widget.RelativeLayout(_context);
     MainThread.BeginInvokeOnMainThread(() =>
     {
         container = adContainer.FindViewById <Android.Widget.RelativeLayout>(Resource.Id.inlineContainer);
         container.AddView(visxAdManager.AdContainer);
     });
 }
        /// <summary>
        /// Initializing Vis.X Inline Universal with Ad unit ID and size
        /// </summary>
        private void InitVisxUniversal()
        {
            _visxAdManagerUniversal = new VisxAdManager.Builder()
                                      .VisxAdUnitID(YOC_UNIVERSAL_ID)
                                      .AdSize(adSize: AdSize.UNDERSTITIAL300x600)
                                      .AppDomain(APP_DOMAIN)
                                      .Context(MainActivity.Instance)
                                      .Callback(this)
                                      .Build();

            HandleUnderstitial();
        }
        private void DisplayAd(VisxAdManager visxAdManager)
        {
            /// Adding Vis.X Universal Ad to the created Android
            /// native View and invoced on the main Xamarin thread
            Android.Widget.RelativeLayout container = new Android.Widget.RelativeLayout(_context);

            MainThread.BeginInvokeOnMainThread(() =>
            {
                container = _adContainer.FindViewById <Android.Widget.RelativeLayout>(Resource.Id.inlineContainer);

                if (visxAdManager.AdContainer.Parent != null)
                {
                    visxAdManager.AdContainer.RemoveFromParent();
                }

                container.AddView(visxAdManager.AdContainer);
            });
        }
 public void OnAdLoadingStarted(VisxAdManager visxAdManager)
 {
     Console.WriteLine("Xamarin.Android.Layer.Universal ---> OnAdLoadingStarted()");
 }
 public void OnAdLoadingFinished(VisxAdManager visxAdManager, string message)
 {
     Console.WriteLine("Xamarin.Android.Layer.Universal ---> OnAdLoadingFinished(): " + message);
     DisplayAd(visxAdManager);
 }
 public void OnAdLoadingFailed(VisxAdManager visxAdManager, string message, bool isFinal)
 {
     Console.WriteLine("Xamarin.Android.Layer.Universal ---> OnAdLoadingFailed(): " + message + " isFinal: " + isFinal);
     MessagingCenter.Send <object, string>(this, ANDROID_CALLBACK_CHANNEL_UNIVERSAL, "0");
 }
 public void OnAdResponseReceived(VisxAdManager visxAdManager, string message)
 {
     Console.WriteLine("Xamarin.Android.Layer.Banner ---> OnAdResponseReceived(): " + message);
 }
 public void OnAdRequestStarted(VisxAdManager visxAdManager)
 {
     Console.WriteLine("Xamarin.Android.Layer.Banner ---> OnAdRequestStarted()");
 }
 public void OnAdLoadingFailed(VisxAdManager visxAdManager, string message, bool isFinal)
 {
     Console.WriteLine("Xamarin.Android.Layer.Banner ---> OnAdLoadingFailed(): " + message + " isFinal: " + isFinal);
 }