/// <summary> /// Refreshed the ad for the view /// </summary> /// <param name="view"></param> public static void LoadAd(Activity activity, View view) { if (String.IsNullOrEmpty (activity.GetText(Resource.String.AdPublisherID))) { view.Visibility = ViewStates.Gone; return; } Logging.Log (null, Logging.LoggingTypeDebug, "LoadAd()"); Task.Factory.StartNew (() => { activity.RunOnUiThread(() => { view.Visibility = ViewStates.Visible; IntPtr methodId = JNIEnv.GetStaticMethodID (_helperClass, "loadAd", "(Landroid/view/View;)V"); JNIEnv.CallStaticVoidMethod (_helperClass, methodId, new JValue (view)); }); }); }