static void n_OnBannerFailed_Lcom_mopub_mobileads_MoPubView_Lcom_mopub_mobileads_MoPubErrorCode_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
 {
     global::com.mopub.mobileads.DefaultBannerAdListener __this = global::Java.Lang.Object.GetObject <global::com.mopub.mobileads.DefaultBannerAdListener> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::com.mopub.mobileads.MoPubView      p0 = global::Java.Lang.Object.GetObject <global::com.mopub.mobileads.MoPubView> (native_p0, JniHandleOwnership.DoNotTransfer);
     global::com.mopub.mobileads.MoPubErrorCode p1 = global::Java.Lang.Object.GetObject <global::com.mopub.mobileads.MoPubErrorCode> (native_p1, JniHandleOwnership.DoNotTransfer);
     __this.OnBannerFailed(p0, p1);
 }
        public unsafe AdViewController(global::Android.Content.Context p0, global::com.mopub.mobileads.MoPubView p1)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(p1);
                if (((object)this).GetType() != typeof(AdViewController))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(((object)this).GetType(), "(Landroid/content/Context;Lcom/mopub/mobileads/MoPubView;)V", __args),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, "(Landroid/content/Context;Lcom/mopub/mobileads/MoPubView;)V", __args);
                    return;
                }

                if (id_ctor_Landroid_content_Context_Lcom_mopub_mobileads_MoPubView_ == IntPtr.Zero)
                {
                    id_ctor_Landroid_content_Context_Lcom_mopub_mobileads_MoPubView_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Landroid/content/Context;Lcom/mopub/mobileads/MoPubView;)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Landroid_content_Context_Lcom_mopub_mobileads_MoPubView_, __args),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Landroid_content_Context_Lcom_mopub_mobileads_MoPubView_, __args);
            } finally {
            }
        }
コード例 #3
0
        static IntPtr n_InternalCreate_Landroid_content_Context_Lcom_mopub_mobileads_MoPubView_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
        {
            global::Com.Mopub.Mobileads.Factories.AdViewControllerFactory __this = global::Java.Lang.Object.GetObject <global::Com.Mopub.Mobileads.Factories.AdViewControllerFactory> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::Android.Content.Context       p0 = global::Java.Lang.Object.GetObject <global::Android.Content.Context> (native_p0, JniHandleOwnership.DoNotTransfer);
            global::com.mopub.mobileads.MoPubView p1 = global::Java.Lang.Object.GetObject <global::com.mopub.mobileads.MoPubView> (native_p1, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.InternalCreate(p0, p1));

            return(__ret);
        }
        static IntPtr n_InternalCreate_Lcom_mopub_mobileads_MoPubView_Ljava_lang_String_Ljava_util_Map_JLcom_mopub_common_AdReport_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1, IntPtr native_p2, long p3, IntPtr native_p4)
        {
            global::Com.Mopub.Mobileads.Factories.CustomEventBannerAdapterFactory __this = global::Java.Lang.Object.GetObject <global::Com.Mopub.Mobileads.Factories.CustomEventBannerAdapterFactory> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            global::com.mopub.mobileads.MoPubView p0 = global::Java.Lang.Object.GetObject <global::com.mopub.mobileads.MoPubView> (native_p0, JniHandleOwnership.DoNotTransfer);
            string p1 = JNIEnv.GetString(native_p1, JniHandleOwnership.DoNotTransfer);
            var    p2 = global::Android.Runtime.JavaDictionary <string, string> .FromJniHandle(native_p2, JniHandleOwnership.DoNotTransfer);

            global::com.mopub.common.AdReport p4 = global::Java.Lang.Object.GetObject <global::com.mopub.common.AdReport> (native_p4, JniHandleOwnership.DoNotTransfer);
            IntPtr __ret = JNIEnv.ToLocalJniHandle(__this.InternalCreate(p0, p1, p2, p3, p4));

            return(__ret);
        }
 public static unsafe global::com.mopub.mobileads.MoPubView Create(global::Android.Content.Context p0)
 {
     if (id_create_Landroid_content_Context_ == IntPtr.Zero)
     {
         id_create_Landroid_content_Context_ = JNIEnv.GetStaticMethodID(class_ref, "create", "(Landroid/content/Context;)Lcom/mopub/mobileads/MoPubView;");
     }
     try {
         JValue *__args = stackalloc JValue [1];
         __args [0] = new JValue(p0);
         global::com.mopub.mobileads.MoPubView __ret = global::Java.Lang.Object.GetObject <global::com.mopub.mobileads.MoPubView> (JNIEnv.CallStaticObjectMethod(class_ref, id_create_Landroid_content_Context_, __args), JniHandleOwnership.TransferLocalRef);
         return(__ret);
     } finally {
     }
 }
        public virtual unsafe void OnBannerClicked(global::com.mopub.mobileads.MoPubView p0)
        {
            if (id_onBannerClicked_Lcom_mopub_mobileads_MoPubView_ == IntPtr.Zero)
            {
                id_onBannerClicked_Lcom_mopub_mobileads_MoPubView_ = JNIEnv.GetMethodID(class_ref, "onBannerClicked", "(Lcom/mopub/mobileads/MoPubView;)V");
            }
            try {
                JValue *__args = stackalloc JValue [1];
                __args [0] = new JValue(p0);

                if (((object)this).GetType() == ThresholdType)
                {
                    JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_onBannerClicked_Lcom_mopub_mobileads_MoPubView_, __args);
                }
                else
                {
                    JNIEnv.CallNonvirtualVoidMethod(((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "onBannerClicked", "(Lcom/mopub/mobileads/MoPubView;)V"), __args);
                }
            } finally {
            }
        }
        public unsafe CustomEventBannerAdapter(global::com.mopub.mobileads.MoPubView p0, string p1, global::System.Collections.Generic.IDictionary <string, string> p2, long p3, global::com.mopub.common.AdReport p4)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_p1 = JNIEnv.NewString(p1);
            IntPtr native_p2 = global::Android.Runtime.JavaDictionary <string, string> .ToLocalJniHandle(p2);

            try {
                JValue *__args = stackalloc JValue [5];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(native_p1);
                __args [2] = new JValue(native_p2);
                __args [3] = new JValue(p3);
                __args [4] = new JValue(p4);
                if (((object)this).GetType() != typeof(CustomEventBannerAdapter))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(((object)this).GetType(), "(Lcom/mopub/mobileads/MoPubView;Ljava/lang/String;Ljava/util/Map;JLcom/mopub/common/AdReport;)V", __args),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, "(Lcom/mopub/mobileads/MoPubView;Ljava/lang/String;Ljava/util/Map;JLcom/mopub/common/AdReport;)V", __args);
                    return;
                }

                if (id_ctor_Lcom_mopub_mobileads_MoPubView_Ljava_lang_String_Ljava_util_Map_JLcom_mopub_common_AdReport_ == IntPtr.Zero)
                {
                    id_ctor_Lcom_mopub_mobileads_MoPubView_Ljava_lang_String_Ljava_util_Map_JLcom_mopub_common_AdReport_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Lcom/mopub/mobileads/MoPubView;Ljava/lang/String;Ljava/util/Map;JLcom/mopub/common/AdReport;)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Lcom_mopub_mobileads_MoPubView_Ljava_lang_String_Ljava_util_Map_JLcom_mopub_common_AdReport_, __args),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Lcom_mopub_mobileads_MoPubView_Ljava_lang_String_Ljava_util_Map_JLcom_mopub_common_AdReport_, __args);
            } finally {
                JNIEnv.DeleteLocalRef(native_p1);
                JNIEnv.DeleteLocalRef(native_p2);
            }
        }
コード例 #8
0
        protected virtual unsafe global::com.mopub.mobileads.AdViewController InternalCreate(global::Android.Content.Context p0, global::com.mopub.mobileads.MoPubView p1)
        {
            if (id_internalCreate_Landroid_content_Context_Lcom_mopub_mobileads_MoPubView_ == IntPtr.Zero)
            {
                id_internalCreate_Landroid_content_Context_Lcom_mopub_mobileads_MoPubView_ = JNIEnv.GetMethodID(class_ref, "internalCreate", "(Landroid/content/Context;Lcom/mopub/mobileads/MoPubView;)Lcom/mopub/mobileads/AdViewController;");
            }
            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(p1);

                global::com.mopub.mobileads.AdViewController __ret;
                if (((object)this).GetType() == ThresholdType)
                {
                    __ret = global::Java.Lang.Object.GetObject <global::com.mopub.mobileads.AdViewController> (JNIEnv.CallObjectMethod(((global::Java.Lang.Object) this).Handle, id_internalCreate_Landroid_content_Context_Lcom_mopub_mobileads_MoPubView_, __args), JniHandleOwnership.TransferLocalRef);
                }
                else
                {
                    __ret = global::Java.Lang.Object.GetObject <global::com.mopub.mobileads.AdViewController> (JNIEnv.CallNonvirtualObjectMethod(((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "internalCreate", "(Landroid/content/Context;Lcom/mopub/mobileads/MoPubView;)Lcom/mopub/mobileads/AdViewController;"), __args), JniHandleOwnership.TransferLocalRef);
                }
                return(__ret);
            } finally {
            }
        }
        public static unsafe global::com.mopub.mobileads.CustomEventBannerAdapter Create(global::com.mopub.mobileads.MoPubView p0, string p1, global::System.Collections.Generic.IDictionary <string, string> p2, long p3, global::com.mopub.common.AdReport p4)
        {
            if (id_create_Lcom_mopub_mobileads_MoPubView_Ljava_lang_String_Ljava_util_Map_JLcom_mopub_common_AdReport_ == IntPtr.Zero)
            {
                id_create_Lcom_mopub_mobileads_MoPubView_Ljava_lang_String_Ljava_util_Map_JLcom_mopub_common_AdReport_ = JNIEnv.GetStaticMethodID(class_ref, "create", "(Lcom/mopub/mobileads/MoPubView;Ljava/lang/String;Ljava/util/Map;JLcom/mopub/common/AdReport;)Lcom/mopub/mobileads/CustomEventBannerAdapter;");
            }
            IntPtr native_p1 = JNIEnv.NewString(p1);
            IntPtr native_p2 = global::Android.Runtime.JavaDictionary <string, string> .ToLocalJniHandle(p2);

            try {
                JValue *__args = stackalloc JValue [5];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(native_p1);
                __args [2] = new JValue(native_p2);
                __args [3] = new JValue(p3);
                __args [4] = new JValue(p4);
                global::com.mopub.mobileads.CustomEventBannerAdapter __ret = global::Java.Lang.Object.GetObject <global::com.mopub.mobileads.CustomEventBannerAdapter> (JNIEnv.CallStaticObjectMethod(class_ref, id_create_Lcom_mopub_mobileads_MoPubView_Ljava_lang_String_Ljava_util_Map_JLcom_mopub_common_AdReport_, __args), JniHandleOwnership.TransferLocalRef);
                return(__ret);
            } finally {
                JNIEnv.DeleteLocalRef(native_p1);
                JNIEnv.DeleteLocalRef(native_p2);
            }
        }