Exemple #1
0
        public static unsafe global::com.mopub.common.AdFormat ValueOf(string p0)
        {
            if (id_valueOf_Ljava_lang_String_ == IntPtr.Zero)
            {
                id_valueOf_Ljava_lang_String_ = JNIEnv.GetStaticMethodID(class_ref, "valueOf", "(Ljava/lang/String;)Lcom/mopub/common/AdFormat;");
            }
            IntPtr native_p0 = JNIEnv.NewString(p0);

            try {
                JValue *__args = stackalloc JValue [1];
                __args [0] = new JValue(native_p0);
                global::com.mopub.common.AdFormat __ret = global::Java.Lang.Object.GetObject <global::com.mopub.common.AdFormat> (JNIEnv.CallStaticObjectMethod(class_ref, id_valueOf_Ljava_lang_String_, __args), JniHandleOwnership.TransferLocalRef);
                return(__ret);
            } finally {
                JNIEnv.DeleteLocalRef(native_p0);
            }
        }
        public static unsafe string GetCustomEventName(global::com.mopub.common.AdFormat p0, string p1, string p2, global::System.Collections.Generic.IDictionary <string, string> p3)
        {
            if (id_getCustomEventName_Lcom_mopub_common_AdFormat_Ljava_lang_String_Ljava_lang_String_Ljava_util_Map_ == IntPtr.Zero)
            {
                id_getCustomEventName_Lcom_mopub_common_AdFormat_Ljava_lang_String_Ljava_lang_String_Ljava_util_Map_ = JNIEnv.GetStaticMethodID(class_ref, "getCustomEventName", "(Lcom/mopub/common/AdFormat;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;)Ljava/lang/String;");
            }
            IntPtr native_p1 = JNIEnv.NewString(p1);
            IntPtr native_p2 = JNIEnv.NewString(p2);
            IntPtr native_p3 = global::Android.Runtime.JavaDictionary <string, string> .ToLocalJniHandle(p3);

            try {
                JValue *__args = stackalloc JValue [4];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(native_p1);
                __args [2] = new JValue(native_p2);
                __args [3] = new JValue(native_p3);
                string __ret = JNIEnv.GetString(JNIEnv.CallStaticObjectMethod(class_ref, id_getCustomEventName_Lcom_mopub_common_AdFormat_Ljava_lang_String_Ljava_lang_String_Ljava_util_Map_, __args), JniHandleOwnership.TransferLocalRef);
                return(__ret);
            } finally {
                JNIEnv.DeleteLocalRef(native_p1);
                JNIEnv.DeleteLocalRef(native_p2);
                JNIEnv.DeleteLocalRef(native_p3);
            }
        }