示例#1
0
        public unsafe PushNotificationTask(global::Android.Content.Context p0, string p1, global::Com.Applozic.Mobicomkit.Listners.IAlPushNotificationHandler p2)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_p1 = JNIEnv.NewString(p1);

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(native_p1);
                __args [2] = new JValue(p2);
                if (((object)this).GetType() != typeof(PushNotificationTask))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(((object)this).GetType(), "(Landroid/content/Context;Ljava/lang/String;Lcom/applozic/mobicomkit/listners/AlPushNotificationHandler;)V", __args),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, "(Landroid/content/Context;Ljava/lang/String;Lcom/applozic/mobicomkit/listners/AlPushNotificationHandler;)V", __args);
                    return;
                }

                if (id_ctor_Landroid_content_Context_Ljava_lang_String_Lcom_applozic_mobicomkit_listners_AlPushNotificationHandler_ == IntPtr.Zero)
                {
                    id_ctor_Landroid_content_Context_Ljava_lang_String_Lcom_applozic_mobicomkit_listners_AlPushNotificationHandler_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Landroid/content/Context;Ljava/lang/String;Lcom/applozic/mobicomkit/listners/AlPushNotificationHandler;)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Landroid_content_Context_Ljava_lang_String_Lcom_applozic_mobicomkit_listners_AlPushNotificationHandler_, __args),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(((global::Java.Lang.Object) this).Handle, class_ref, id_ctor_Landroid_content_Context_Ljava_lang_String_Lcom_applozic_mobicomkit_listners_AlPushNotificationHandler_, __args);
            } finally {
                JNIEnv.DeleteLocalRef(native_p1);
            }
        }
 public static unsafe void RegisterForPushNotification(global::Android.Content.Context p0, global::Com.Applozic.Mobicomkit.Listners.IAlPushNotificationHandler p1)
 {
     if (id_registerForPushNotification_Landroid_content_Context_Lcom_applozic_mobicomkit_listners_AlPushNotificationHandler_ == IntPtr.Zero)
     {
         id_registerForPushNotification_Landroid_content_Context_Lcom_applozic_mobicomkit_listners_AlPushNotificationHandler_ = JNIEnv.GetStaticMethodID(class_ref, "registerForPushNotification", "(Landroid/content/Context;Lcom/applozic/mobicomkit/listners/AlPushNotificationHandler;)V");
     }
     try {
         JValue *__args = stackalloc JValue [2];
         __args [0] = new JValue(p0);
         __args [1] = new JValue(p1);
         JNIEnv.CallStaticVoidMethod(class_ref, id_registerForPushNotification_Landroid_content_Context_Lcom_applozic_mobicomkit_listners_AlPushNotificationHandler_, __args);
     } finally {
     }
 }
        public static unsafe void RegisterForPushNotification(global::Android.Content.Context p0, string p1, global::Com.Applozic.Mobicomkit.Listners.IAlPushNotificationHandler p2)
        {
            if (id_registerForPushNotification_Landroid_content_Context_Ljava_lang_String_Lcom_applozic_mobicomkit_listners_AlPushNotificationHandler_ == IntPtr.Zero)
            {
                id_registerForPushNotification_Landroid_content_Context_Ljava_lang_String_Lcom_applozic_mobicomkit_listners_AlPushNotificationHandler_ = JNIEnv.GetStaticMethodID(class_ref, "registerForPushNotification", "(Landroid/content/Context;Ljava/lang/String;Lcom/applozic/mobicomkit/listners/AlPushNotificationHandler;)V");
            }
            IntPtr native_p1 = JNIEnv.NewString(p1);

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(native_p1);
                __args [2] = new JValue(p2);
                JNIEnv.CallStaticVoidMethod(class_ref, id_registerForPushNotification_Landroid_content_Context_Ljava_lang_String_Lcom_applozic_mobicomkit_listners_AlPushNotificationHandler_, __args);
            } finally {
                JNIEnv.DeleteLocalRef(native_p1);
            }
        }
示例#4
0
 static void n_OnFailure_Lcom_applozic_mobicomkit_api_account_register_RegistrationResponse_Ljava_lang_Exception_(IntPtr jnienv, IntPtr native__this, IntPtr native_p0, IntPtr native_p1)
 {
     global::Com.Applozic.Mobicomkit.Listners.IAlPushNotificationHandler       __this = global::Java.Lang.Object.GetObject <global::Com.Applozic.Mobicomkit.Listners.IAlPushNotificationHandler> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
     global::Com.Applozic.Mobicomkit.Api.Account.Register.RegistrationResponse p0     = global::Java.Lang.Object.GetObject <global::Com.Applozic.Mobicomkit.Api.Account.Register.RegistrationResponse> (native_p0, JniHandleOwnership.DoNotTransfer);
     global::Java.Lang.Exception p1 = global::Java.Lang.Object.GetObject <global::Java.Lang.Exception> (native_p1, JniHandleOwnership.DoNotTransfer);
     __this.OnFailure(p0, p1);
 }