public static unsafe int[] BuildInterleavedMap(int p0, int p1, int[] p2)
        {
            if (id_buildInterleavedMap_IIarrayI == IntPtr.Zero)
            {
                id_buildInterleavedMap_IIarrayI = JNIEnv.GetStaticMethodID(class_ref, "buildInterleavedMap", "(II[I)[I");
            }
            IntPtr native_p2 = JNIEnv.NewArray(p2);

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(p1);
                __args [2] = new JValue(native_p2);
                int[] __ret = (int[])JNIEnv.GetArray(JNIEnv.CallStaticObjectMethod(class_ref, id_buildInterleavedMap_IIarrayI, __args), JniHandleOwnership.TransferLocalRef, typeof(int));
                return(__ret);
            } finally {
                if (p2 != null)
                {
                    JNIEnv.CopyArray(native_p2, p2);
                    JNIEnv.DeleteLocalRef(native_p2);
                }
            }
        }
        public virtual unsafe void AcquireTokenSilentAsync(string[] scopes, string authority, global::Com.Microsoft.Identity.Client.ISilentAuthenticationCallback @callback)
        {
            const string __id             = "acquireTokenSilentAsync.([Ljava/lang/String;Ljava/lang/String;Lcom/microsoft/identity/client/SilentAuthenticationCallback;)V";
            IntPtr       native_scopes    = JNIEnv.NewArray(scopes);
            IntPtr       native_authority = JNIEnv.NewString(authority);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [3];
                __args [0] = new JniArgumentValue(native_scopes);
                __args [1] = new JniArgumentValue(native_authority);
                __args [2] = new JniArgumentValue((@callback == null) ? IntPtr.Zero : ((global::Java.Lang.Object)@callback).Handle);
                _members.InstanceMethods.InvokeVirtualVoidMethod(__id, this, __args);
            } finally {
                if (scopes != null)
                {
                    JNIEnv.CopyArray(native_scopes, scopes);
                    JNIEnv.DeleteLocalRef(native_scopes);
                }
                JNIEnv.DeleteLocalRef(native_authority);
                global::System.GC.KeepAlive(scopes);
                global::System.GC.KeepAlive(@callback);
            }
        }
        public static unsafe global::Okio.ByteString Of(byte[] p0, int p1, int p2)
        {
            if (id_of_arrayBII == IntPtr.Zero)
            {
                id_of_arrayBII = JNIEnv.GetStaticMethodID(class_ref, "of", "([BII)Lokio/ByteString;");
            }
            IntPtr native_p0 = JNIEnv.NewArray(p0);

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(p1);
                __args [2] = new JValue(p2);
                global::Okio.ByteString __ret = global::Java.Lang.Object.GetObject <global::Okio.ByteString> (JNIEnv.CallStaticObjectMethod(class_ref, id_of_arrayBII, __args), JniHandleOwnership.TransferLocalRef);
                return(__ret);
            } finally {
                if (p0 != null)
                {
                    JNIEnv.CopyArray(native_p0, p0);
                    JNIEnv.DeleteLocalRef(native_p0);
                }
            }
        }
예제 #4
0
        public static unsafe int CalcVolumLevel(long p0, byte[] p1, int p2, global::Com.Iflytek.Msc.VAD.VadData p3)
        {
            const string __id      = "CalcVolumLevel.(J[BILcom/iflytek/msc/VAD$VadData;)I";
            IntPtr       native_p1 = JNIEnv.NewArray(p1);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [4];
                __args [0] = new JniArgumentValue(p0);
                __args [1] = new JniArgumentValue(native_p1);
                __args [2] = new JniArgumentValue(p2);
                __args [3] = new JniArgumentValue((p3 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p3).Handle);
                var __rm = _members.StaticMethods.InvokeInt32Method(__id, __args);
                return(__rm);
            } finally {
                if (p1 != null)
                {
                    JNIEnv.CopyArray(native_p1, p1);
                    JNIEnv.DeleteLocalRef(native_p1);
                }
                global::System.GC.KeepAlive(p1);
                global::System.GC.KeepAlive(p3);
            }
        }
        public static unsafe void Wtf(string p0, params global::Java.Lang.Object[] p1)
        {
            if (id_wtf_Ljava_lang_String_arrayLjava_lang_Object_ == IntPtr.Zero)
            {
                id_wtf_Ljava_lang_String_arrayLjava_lang_Object_ = JNIEnv.GetStaticMethodID(class_ref, "wtf", "(Ljava/lang/String;[Ljava/lang/Object;)V");
            }
            IntPtr native_p0 = JNIEnv.NewString(p0);
            IntPtr native_p1 = JNIEnv.NewArray(p1);

            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(native_p1);
                JNIEnv.CallStaticVoidMethod(class_ref, id_wtf_Ljava_lang_String_arrayLjava_lang_Object_, __args);
            } finally {
                JNIEnv.DeleteLocalRef(native_p0);
                if (p1 != null)
                {
                    JNIEnv.CopyArray(native_p1, p1);
                    JNIEnv.DeleteLocalRef(native_p1);
                }
            }
        }
예제 #6
0
        public unsafe global::Android.Net.Uri 鷭(byte[] p0, int p1, int p2)
        {
            if (id_鷭_arrayBII == IntPtr.Zero)
            {
                id_鷭_arrayBII = JNIEnv.GetMethodID(class_ref, "鷭", "([BII)Landroid/net/Uri;");
            }
            IntPtr native_p0 = JNIEnv.NewArray(p0);

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(p1);
                __args [2] = new JValue(p2);
                global::Android.Net.Uri __ret = global::Java.Lang.Object.GetObject <global::Android.Net.Uri> (JNIEnv.CallObjectMethod(Handle, id_鷭_arrayBII, __args), JniHandleOwnership.TransferLocalRef);
                return(__ret);
            } finally {
                if (p0 != null)
                {
                    JNIEnv.CopyArray(native_p0, p0);
                    JNIEnv.DeleteLocalRef(native_p0);
                }
            }
        }
        public static unsafe int RecvPush(long p0, byte[] p1, int p2)
        {
            if (id_RecvPush_JarrayBI == IntPtr.Zero)
            {
                id_RecvPush_JarrayBI = JNIEnv.GetStaticMethodID(class_ref, "RecvPush", "(J[BI)I");
            }
            IntPtr native_p1 = JNIEnv.NewArray(p1);

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(p0);
                __args [1] = new JValue(native_p1);
                __args [2] = new JValue(p2);
                int __ret = JNIEnv.CallStaticIntMethod(class_ref, id_RecvPush_JarrayBI, __args);
                return(__ret);
            } finally {
                if (p1 != null)
                {
                    JNIEnv.CopyArray(native_p1, p1);
                    JNIEnv.DeleteLocalRef(native_p1);
                }
            }
        }
        public static unsafe void PutToDiskCacheAsync(string p0, byte[] p1)
        {
            if (id_putToDiskCacheAsync_Ljava_lang_String_arrayB == IntPtr.Zero)
            {
                id_putToDiskCacheAsync_Ljava_lang_String_arrayB = JNIEnv.GetStaticMethodID(class_ref, "putToDiskCacheAsync", "(Ljava/lang/String;[B)V");
            }
            IntPtr native_p0 = JNIEnv.NewString(p0);
            IntPtr native_p1 = JNIEnv.NewArray(p1);

            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(native_p1);
                JNIEnv.CallStaticVoidMethod(class_ref, id_putToDiskCacheAsync_Ljava_lang_String_arrayB, __args);
            } finally {
                JNIEnv.DeleteLocalRef(native_p0);
                if (p1 != null)
                {
                    JNIEnv.CopyArray(native_p1, p1);
                    JNIEnv.DeleteLocalRef(native_p1);
                }
            }
        }
        public unsafe void SetPixels(int[] p0, int p1, int p2, int p3, int p4, int p5, int p6)
        {
            if (id_setPixels_arrayIIIIIII == IntPtr.Zero)
            {
                id_setPixels_arrayIIIIIII = JNIEnv.GetMethodID(class_ref, "setPixels", "([IIIIIII)V");
            }
            IntPtr  native_p0 = JNIEnv.NewArray(p0);
            JValue *__args    = stackalloc JValue [7];

            __args [0] = new JValue(native_p0);
            __args [1] = new JValue(p1);
            __args [2] = new JValue(p2);
            __args [3] = new JValue(p3);
            __args [4] = new JValue(p4);
            __args [5] = new JValue(p5);
            __args [6] = new JValue(p6);
            JNIEnv.CallVoidMethod(((global::Java.Lang.Object) this).Handle, id_setPixels_arrayIIIIIII, __args);
            if (p0 != null)
            {
                JNIEnv.CopyArray(native_p0, p0);
                JNIEnv.DeleteLocalRef(native_p0);
            }
        }
예제 #10
0
        public override unsafe int Update(global::Android.Net.Uri uri, global::Android.Content.ContentValues values, string selection, string[] selectionArgs)
        {
            const string __id                 = "update.(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I";
            IntPtr       native_selection     = JNIEnv.NewString(selection);
            IntPtr       native_selectionArgs = JNIEnv.NewArray(selectionArgs);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [4];
                __args [0] = new JniArgumentValue((uri == null) ? IntPtr.Zero : ((global::Java.Lang.Object)uri).Handle);
                __args [1] = new JniArgumentValue((values == null) ? IntPtr.Zero : ((global::Java.Lang.Object)values).Handle);
                __args [2] = new JniArgumentValue(native_selection);
                __args [3] = new JniArgumentValue(native_selectionArgs);
                var __rm = _members.InstanceMethods.InvokeVirtualInt32Method(__id, this, __args);
                return(__rm);
            } finally {
                JNIEnv.DeleteLocalRef(native_selection);
                if (selectionArgs != null)
                {
                    JNIEnv.CopyArray(native_selectionArgs, selectionArgs);
                    JNIEnv.DeleteLocalRef(native_selectionArgs);
                }
            }
        }
        public void ByteArrayArray_IsConvertibleTo_JavaLangObjectArray()
        {
            /*
             * Yay, Java array covariance allows this:
             *   byte[][] a = new byte[][]{new byte[]{1,2}};
             *   Object[] o = a;
             *   byte[]   c = (byte[]) o [0];
             */
            IntPtr x = JNIEnv.NewArray <byte[]>(new byte[][] { new byte[] { 11, 12 }, new byte[] { 21, 22 } });

            Assert.AreEqual("[[B", JNIEnv.GetClassNameFromInstance(x));
            var items = JNIEnv.GetArray <Java.Lang.Object>(x);

            JNIEnv.DeleteLocalRef(x);

            Assert.AreEqual(2, items.Length);
            Assert.AreEqual(typeof(Java.Lang.Object), items [0].GetType());

            var bytes = new byte[2];

            JNIEnv.CopyArray(items [0].Handle, bytes);
            AssertArrays("CopyArray<byte>", bytes, (byte)11, (byte)12);
        }
        public static unsafe global::Org.Neuroph.Core.Learning.TrainingSet ImportFromArray(double[] p0, int p1, int p2)
        {
            if (id_importFromArray_arrayDII == IntPtr.Zero)
            {
                id_importFromArray_arrayDII = JNIEnv.GetStaticMethodID(class_ref, "importFromArray", "([DII)Lorg/neuroph/core/learning/TrainingSet;");
            }
            IntPtr native_p0 = JNIEnv.NewArray(p0);

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(p1);
                __args [2] = new JValue(p2);
                global::Org.Neuroph.Core.Learning.TrainingSet __ret = global::Java.Lang.Object.GetObject <global::Org.Neuroph.Core.Learning.TrainingSet> (JNIEnv.CallStaticObjectMethod(class_ref, id_importFromArray_arrayDII, __args), JniHandleOwnership.TransferLocalRef);
                return(__ret);
            } finally {
                if (p0 != null)
                {
                    JNIEnv.CopyArray(native_p0, p0);
                    JNIEnv.DeleteLocalRef(native_p0);
                }
            }
        }
        public unsafe int Read(byte[] p0, int p1, int p2)
        {
            if (id_read_arrayBII == IntPtr.Zero)
            {
                id_read_arrayBII = JNIEnv.GetMethodID(class_ref, "read", "([BII)I");
            }
            IntPtr native_p0 = JNIEnv.NewArray(p0);

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(p1);
                __args [2] = new JValue(p2);
                int __ret = JNIEnv.CallIntMethod(((global::Java.Lang.Object) this).Handle, id_read_arrayBII, __args);
                return(__ret);
            } finally {
                if (p0 != null)
                {
                    JNIEnv.CopyArray(native_p0, p0);
                    JNIEnv.DeleteLocalRef(native_p0);
                }
            }
        }
        public static unsafe global::Com.Mob.Commons.Filesys.FileUploader.UploadedImage UploadImage(global::Com.Mob.Commons.IMobProduct p0, string p1, bool p2, params int[] p3)
        {
            const string __id      = "uploadImage.(Lcom/mob/commons/MobProduct;Ljava/lang/String;Z[I)Lcom/mob/commons/filesys/FileUploader$UploadedImage;";
            IntPtr       native_p1 = JNIEnv.NewString(p1);
            IntPtr       native_p3 = JNIEnv.NewArray(p3);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [4];
                __args [0] = new JniArgumentValue((p0 == null) ? IntPtr.Zero : ((global::Java.Lang.Object)p0).Handle);
                __args [1] = new JniArgumentValue(native_p1);
                __args [2] = new JniArgumentValue(p2);
                __args [3] = new JniArgumentValue(native_p3);
                var __rm = _members.StaticMethods.InvokeObjectMethod(__id, __args);
                return(global::Java.Lang.Object.GetObject <global::Com.Mob.Commons.Filesys.FileUploader.UploadedImage> (__rm.Handle, JniHandleOwnership.TransferLocalRef));
            } finally {
                JNIEnv.DeleteLocalRef(native_p1);
                if (p3 != null)
                {
                    JNIEnv.CopyArray(native_p3, p3);
                    JNIEnv.DeleteLocalRef(native_p3);
                }
            }
        }
            public static unsafe global::Org.Jcodec.Containers.Mkv.CuesFactory.CuePointMock Make(byte[] p0, long p1, long p2)
            {
                if (id_make_arrayBJJ == IntPtr.Zero)
                {
                    id_make_arrayBJJ = JNIEnv.GetStaticMethodID(class_ref, "make", "([BJJ)Lorg/jcodec/containers/mkv/CuesFactory$CuePointMock;");
                }
                IntPtr native_p0 = JNIEnv.NewArray(p0);

                try {
                    JValue *__args = stackalloc JValue [3];
                    __args [0] = new JValue(native_p0);
                    __args [1] = new JValue(p1);
                    __args [2] = new JValue(p2);
                    global::Org.Jcodec.Containers.Mkv.CuesFactory.CuePointMock __ret = global::Java.Lang.Object.GetObject <global::Org.Jcodec.Containers.Mkv.CuesFactory.CuePointMock> (JNIEnv.CallStaticObjectMethod(class_ref, id_make_arrayBJJ, __args), JniHandleOwnership.TransferLocalRef);
                    return(__ret);
                } finally {
                    if (p0 != null)
                    {
                        JNIEnv.CopyArray(native_p0, p0);
                        JNIEnv.DeleteLocalRef(native_p0);
                    }
                }
            }
예제 #16
0
        public static unsafe string EncodeBytes(byte[] p0, int p1, int p2)
        {
            if (id_encodeBytes_arrayBII == IntPtr.Zero)
            {
                id_encodeBytes_arrayBII = JNIEnv.GetStaticMethodID(class_ref, "encodeBytes", "([BII)Ljava/lang/String;");
            }
            IntPtr native_p0 = JNIEnv.NewArray(p0);

            try {
                JValue *__args = stackalloc JValue [3];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(p1);
                __args [2] = new JValue(p2);
                string __ret = JNIEnv.GetString(JNIEnv.CallStaticObjectMethod(class_ref, id_encodeBytes_arrayBII, __args), JniHandleOwnership.TransferLocalRef);
                return(__ret);
            } finally {
                if (p0 != null)
                {
                    JNIEnv.CopyArray(native_p0, p0);
                    JNIEnv.DeleteLocalRef(native_p0);
                }
            }
        }
예제 #17
0
        public static unsafe int Update(global::Com.Mob.Tools.Utils.SQLiteHelper.SingleTableDB db, global::Android.Content.ContentValues values, string selection, string[] selectionArgs)
        {
            const string __id                 = "update.(Lcom/mob/tools/utils/SQLiteHelper$SingleTableDB;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I";
            IntPtr       native_selection     = JNIEnv.NewString(selection);
            IntPtr       native_selectionArgs = JNIEnv.NewArray(selectionArgs);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [4];
                __args [0] = new JniArgumentValue((db == null) ? IntPtr.Zero : ((global::Java.Lang.Object)db).Handle);
                __args [1] = new JniArgumentValue((values == null) ? IntPtr.Zero : ((global::Java.Lang.Object)values).Handle);
                __args [2] = new JniArgumentValue(native_selection);
                __args [3] = new JniArgumentValue(native_selectionArgs);
                var __rm = _members.StaticMethods.InvokeInt32Method(__id, __args);
                return(__rm);
            } finally {
                JNIEnv.DeleteLocalRef(native_selection);
                if (selectionArgs != null)
                {
                    JNIEnv.CopyArray(native_selectionArgs, selectionArgs);
                    JNIEnv.DeleteLocalRef(native_selectionArgs);
                }
            }
        }
예제 #18
0
        public virtual unsafe double[] NormalizeMax(double[] p0, double[] p1)
        {
            if (id_normalizeMax_arrayDarrayD == IntPtr.Zero)
            {
                id_normalizeMax_arrayDarrayD = JNIEnv.GetMethodID(class_ref, "normalizeMax", "([D[D)[D");
            }
            IntPtr native_p0 = JNIEnv.NewArray(p0);
            IntPtr native_p1 = JNIEnv.NewArray(p1);

            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(native_p1);

                double[] __ret;
                if (GetType() == ThresholdType)
                {
                    __ret = (double[])JNIEnv.GetArray(JNIEnv.CallObjectMethod(((global::Java.Lang.Object) this).Handle, id_normalizeMax_arrayDarrayD, __args), JniHandleOwnership.TransferLocalRef, typeof(double));
                }
                else
                {
                    __ret = (double[])JNIEnv.GetArray(JNIEnv.CallNonvirtualObjectMethod(((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "normalizeMax", "([D[D)[D"), __args), JniHandleOwnership.TransferLocalRef, typeof(double));
                }
                return(__ret);
            } finally {
                if (p0 != null)
                {
                    JNIEnv.CopyArray(native_p0, p0);
                    JNIEnv.DeleteLocalRef(native_p0);
                }
                if (p1 != null)
                {
                    JNIEnv.CopyArray(native_p1, p1);
                    JNIEnv.DeleteLocalRef(native_p1);
                }
            }
        }
예제 #19
0
        public MapTileRequestState(global::Osmdroid.TileProvider.MapTile mapTile, global::Osmdroid.TileProvider.Modules.MapTileModuleProviderBase[] providers, global::Osmdroid.TileProvider.IMapTileProviderCallback @callback) : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_providers = JNIEnv.NewArray(providers);;

            if (GetType() != typeof(MapTileRequestState))
            {
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(Lorg/osmdroid/tileprovider/MapTile;[Lorg/osmdroid/tileprovider/modules/MapTileModuleProviderBase;Lorg/osmdroid/tileprovider/IMapTileProviderCallback;)V", new JValue(mapTile), new JValue(native_providers), new JValue(@callback)),
                    JniHandleOwnership.TransferLocalRef);
                global::Android.Runtime.JNIEnv.FinishCreateInstance(Handle, "(Lorg/osmdroid/tileprovider/MapTile;[Lorg/osmdroid/tileprovider/modules/MapTileModuleProviderBase;Lorg/osmdroid/tileprovider/IMapTileProviderCallback;)V", new JValue(mapTile), new JValue(native_providers), new JValue(@callback));
                if (providers != null)
                {
                    JNIEnv.CopyArray(native_providers, providers);
                    JNIEnv.DeleteLocalRef(native_providers);
                }
                return;
            }

            if (id_ctor_Lorg_osmdroid_tileprovider_MapTile_arrayLorg_osmdroid_tileprovider_modules_MapTileModuleProviderBase_Lorg_osmdroid_tileprovider_IMapTileProviderCallback_ == IntPtr.Zero)
            {
                id_ctor_Lorg_osmdroid_tileprovider_MapTile_arrayLorg_osmdroid_tileprovider_modules_MapTileModuleProviderBase_Lorg_osmdroid_tileprovider_IMapTileProviderCallback_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Lorg/osmdroid/tileprovider/MapTile;[Lorg/osmdroid/tileprovider/modules/MapTileModuleProviderBase;Lorg/osmdroid/tileprovider/IMapTileProviderCallback;)V");
            }
            SetHandle(
                global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Lorg_osmdroid_tileprovider_MapTile_arrayLorg_osmdroid_tileprovider_modules_MapTileModuleProviderBase_Lorg_osmdroid_tileprovider_IMapTileProviderCallback_, new JValue(mapTile), new JValue(native_providers), new JValue(@callback)),
                JniHandleOwnership.TransferLocalRef);
            JNIEnv.FinishCreateInstance(Handle, class_ref, id_ctor_Lorg_osmdroid_tileprovider_MapTile_arrayLorg_osmdroid_tileprovider_modules_MapTileModuleProviderBase_Lorg_osmdroid_tileprovider_IMapTileProviderCallback_, new JValue(mapTile), new JValue(native_providers), new JValue(@callback));
            if (providers != null)
            {
                JNIEnv.CopyArray(native_providers, providers);
                JNIEnv.DeleteLocalRef(native_providers);
            }
        }
            public CologneBuffer(global::Com.Parse.Codec.Language.ColognePhonetic __self, char[] p1) : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
            {
                if (Handle != IntPtr.Zero)
                {
                    return;
                }

                IntPtr native_p1 = JNIEnv.NewArray(p1);;

                if (GetType() != typeof(CologneBuffer))
                {
                    SetHandle(
                        global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(L" + global::Android.Runtime.JNIEnv.GetJniName(GetType().DeclaringType) + ";[C)V", new JValue(__self), new JValue(native_p1)),
                        JniHandleOwnership.TransferLocalRef);
                    global::Android.Runtime.JNIEnv.FinishCreateInstance(Handle, "(L" + global::Android.Runtime.JNIEnv.GetJniName(GetType().DeclaringType) + ";[C)V", new JValue(__self), new JValue(native_p1));
                    if (p1 != null)
                    {
                        JNIEnv.CopyArray(native_p1, p1);
                        JNIEnv.DeleteLocalRef(native_p1);
                    }
                    return;
                }

                if (id_ctor_Lcom_parse_codec_language_ColognePhonetic_arrayC == IntPtr.Zero)
                {
                    id_ctor_Lcom_parse_codec_language_ColognePhonetic_arrayC = JNIEnv.GetMethodID(class_ref, "<init>", "(Lcom/parse/codec/language/ColognePhonetic;[C)V");
                }
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Lcom_parse_codec_language_ColognePhonetic_arrayC, new JValue(__self), new JValue(native_p1)),
                    JniHandleOwnership.TransferLocalRef);
                JNIEnv.FinishCreateInstance(Handle, class_ref, id_ctor_Lcom_parse_codec_language_ColognePhonetic_arrayC, new JValue(__self), new JValue(native_p1));
                if (p1 != null)
                {
                    JNIEnv.CopyArray(native_p1, p1);
                    JNIEnv.DeleteLocalRef(native_p1);
                }
            }
        public SpdyDataProvider(byte[] p0) : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_p0 = JNIEnv.NewArray(p0);;

            if (GetType() != typeof(SpdyDataProvider))
            {
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "([B)V", new JValue(native_p0)),
                    JniHandleOwnership.TransferLocalRef);
                global::Android.Runtime.JNIEnv.FinishCreateInstance(Handle, "([B)V", new JValue(native_p0));
                if (p0 != null)
                {
                    JNIEnv.CopyArray(native_p0, p0);
                    JNIEnv.DeleteLocalRef(native_p0);
                }
                return;
            }

            if (id_ctor_arrayB == IntPtr.Zero)
            {
                id_ctor_arrayB = JNIEnv.GetMethodID(class_ref, "<init>", "([B)V");
            }
            SetHandle(
                global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_arrayB, new JValue(native_p0)),
                JniHandleOwnership.TransferLocalRef);
            JNIEnv.FinishCreateInstance(Handle, class_ref, id_ctor_arrayB, new JValue(native_p0));
            if (p0 != null)
            {
                JNIEnv.CopyArray(native_p0, p0);
                JNIEnv.DeleteLocalRef(native_p0);
            }
        }
        public BasicStroke(global::Android.Graphics.Paint.Cap p0, global::Android.Graphics.Paint.Join p1, float p2, float[] p3, float p4) : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_p3 = JNIEnv.NewArray(p3);;

            if (GetType() != typeof(BasicStroke))
            {
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(Landroid/graphics/Paint$Cap;Landroid/graphics/Paint$Join;F[FF)V", new JValue(p0), new JValue(p1), new JValue(p2), new JValue(native_p3), new JValue(p4)),
                    JniHandleOwnership.TransferLocalRef);
                global::Android.Runtime.JNIEnv.FinishCreateInstance(Handle, "(Landroid/graphics/Paint$Cap;Landroid/graphics/Paint$Join;F[FF)V", new JValue(p0), new JValue(p1), new JValue(p2), new JValue(native_p3), new JValue(p4));
                if (p3 != null)
                {
                    JNIEnv.CopyArray(native_p3, p3);
                    JNIEnv.DeleteLocalRef(native_p3);
                }
                return;
            }

            if (id_ctor_Landroid_graphics_Paint_Cap_Landroid_graphics_Paint_Join_FarrayFF == IntPtr.Zero)
            {
                id_ctor_Landroid_graphics_Paint_Cap_Landroid_graphics_Paint_Join_FarrayFF = JNIEnv.GetMethodID(class_ref, "<init>", "(Landroid/graphics/Paint$Cap;Landroid/graphics/Paint$Join;F[FF)V");
            }
            SetHandle(
                global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Landroid_graphics_Paint_Cap_Landroid_graphics_Paint_Join_FarrayFF, new JValue(p0), new JValue(p1), new JValue(p2), new JValue(native_p3), new JValue(p4)),
                JniHandleOwnership.TransferLocalRef);
            JNIEnv.FinishCreateInstance(Handle, class_ref, id_ctor_Landroid_graphics_Paint_Cap_Landroid_graphics_Paint_Join_FarrayFF, new JValue(p0), new JValue(p1), new JValue(p2), new JValue(native_p3), new JValue(p4));
            if (p3 != null)
            {
                JNIEnv.CopyArray(native_p3, p3);
                JNIEnv.DeleteLocalRef(native_p3);
            }
        }
예제 #23
0
        public CombinedXYChart(global::Org.Achartengine.Model.XYMultipleSeriesDataset p0, global::Org.Achartengine.Renderer.XYMultipleSeriesRenderer p1, string[] p2) : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_p2 = JNIEnv.NewArray(p2);;

            if (GetType() != typeof(CombinedXYChart))
            {
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(Lorg/achartengine/model/XYMultipleSeriesDataset;Lorg/achartengine/renderer/XYMultipleSeriesRenderer;[Ljava/lang/String;)V", new JValue(p0), new JValue(p1), new JValue(native_p2)),
                    JniHandleOwnership.TransferLocalRef);
                global::Android.Runtime.JNIEnv.FinishCreateInstance(Handle, "(Lorg/achartengine/model/XYMultipleSeriesDataset;Lorg/achartengine/renderer/XYMultipleSeriesRenderer;[Ljava/lang/String;)V", new JValue(p0), new JValue(p1), new JValue(native_p2));
                if (p2 != null)
                {
                    JNIEnv.CopyArray(native_p2, p2);
                    JNIEnv.DeleteLocalRef(native_p2);
                }
                return;
            }

            if (id_ctor_Lorg_achartengine_model_XYMultipleSeriesDataset_Lorg_achartengine_renderer_XYMultipleSeriesRenderer_arrayLjava_lang_String_ == IntPtr.Zero)
            {
                id_ctor_Lorg_achartengine_model_XYMultipleSeriesDataset_Lorg_achartengine_renderer_XYMultipleSeriesRenderer_arrayLjava_lang_String_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Lorg/achartengine/model/XYMultipleSeriesDataset;Lorg/achartengine/renderer/XYMultipleSeriesRenderer;[Ljava/lang/String;)V");
            }
            SetHandle(
                global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Lorg_achartengine_model_XYMultipleSeriesDataset_Lorg_achartengine_renderer_XYMultipleSeriesRenderer_arrayLjava_lang_String_, new JValue(p0), new JValue(p1), new JValue(native_p2)),
                JniHandleOwnership.TransferLocalRef);
            JNIEnv.FinishCreateInstance(Handle, class_ref, id_ctor_Lorg_achartengine_model_XYMultipleSeriesDataset_Lorg_achartengine_renderer_XYMultipleSeriesRenderer_arrayLjava_lang_String_, new JValue(p0), new JValue(p1), new JValue(native_p2));
            if (p2 != null)
            {
                JNIEnv.CopyArray(native_p2, p2);
                JNIEnv.DeleteLocalRef(native_p2);
            }
        }
        public virtual unsafe int ReadTree(int[] p0, int[] p1)
        {
            if (id_readTree_arrayIarrayI == IntPtr.Zero)
            {
                id_readTree_arrayIarrayI = JNIEnv.GetMethodID(class_ref, "readTree", "([I[I)I");
            }
            IntPtr native_p0 = JNIEnv.NewArray(p0);
            IntPtr native_p1 = JNIEnv.NewArray(p1);

            try {
                JValue *__args = stackalloc JValue [2];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(native_p1);

                int __ret;
                if (GetType() == ThresholdType)
                {
                    __ret = JNIEnv.CallIntMethod(((global::Java.Lang.Object) this).Handle, id_readTree_arrayIarrayI, __args);
                }
                else
                {
                    __ret = JNIEnv.CallNonvirtualIntMethod(((global::Java.Lang.Object) this).Handle, ThresholdClass, JNIEnv.GetMethodID(ThresholdClass, "readTree", "([I[I)I"), __args);
                }
                return(__ret);
            } finally {
                if (p0 != null)
                {
                    JNIEnv.CopyArray(native_p0, p0);
                    JNIEnv.DeleteLocalRef(native_p0);
                }
                if (p1 != null)
                {
                    JNIEnv.CopyArray(native_p1, p1);
                    JNIEnv.DeleteLocalRef(native_p1);
                }
            }
        }
예제 #25
0
        public static unsafe void PredictDC(int[] p0, int p1, bool p2, bool p3, int[] p4, int[] p5)
        {
            if (id_predictDC_arrayIIZZarrayIarrayI == IntPtr.Zero)
            {
                id_predictDC_arrayIIZZarrayIarrayI = JNIEnv.GetStaticMethodID(class_ref, "predictDC", "([IIZZ[I[I)V");
            }
            IntPtr native_p0 = JNIEnv.NewArray(p0);
            IntPtr native_p4 = JNIEnv.NewArray(p4);
            IntPtr native_p5 = JNIEnv.NewArray(p5);

            try {
                JValue *__args = stackalloc JValue [6];
                __args [0] = new JValue(native_p0);
                __args [1] = new JValue(p1);
                __args [2] = new JValue(p2);
                __args [3] = new JValue(p3);
                __args [4] = new JValue(native_p4);
                __args [5] = new JValue(native_p5);
                JNIEnv.CallStaticVoidMethod(class_ref, id_predictDC_arrayIIZZarrayIarrayI, __args);
            } finally {
                if (p0 != null)
                {
                    JNIEnv.CopyArray(native_p0, p0);
                    JNIEnv.DeleteLocalRef(native_p0);
                }
                if (p4 != null)
                {
                    JNIEnv.CopyArray(native_p4, p4);
                    JNIEnv.DeleteLocalRef(native_p4);
                }
                if (p5 != null)
                {
                    JNIEnv.CopyArray(native_p5, p5);
                    JNIEnv.DeleteLocalRef(native_p5);
                }
            }
        }
 /// <summary>
 /// This is a BroadcastReceiver which receives the intent-filtered Short Message Service messages. onReceive,
 /// we extract the Short Message Service message bundle and show a toast message and also update the UI by adding the SMS message to the SMS inbox list.
 /// When a SMS message arrives, the inbox is automatically refreshed.
 /// </summary>
 /// <param name="context">Context The current context of the People application</param>
 /// <param name="intent">Intent containing the Short Message Service data</param>
 public override void OnReceive(Context context, Intent intent)
 {
     try
     {
         if (intent.Action != IntentAction)
         {
             return;
         }
         var bundle = intent.Extras;
         if (bundle == null)
         {
             return;
         }
         var pdus       = bundle.Get("pdus");
         var castedPdus = JNIEnv.GetArray <Java.Lang.Object>(pdus.Handle);
         var msgs       = new SmsMessage[castedPdus.Length];
         for (var i = 0; i < msgs.Length; i++)
         {
             var bytes = new byte[JNIEnv.GetArrayLength(castedPdus[i].Handle)];
             JNIEnv.CopyArray(castedPdus[i].Handle, bytes);
             msgs[i] = SmsMessage.CreateFromPdu(bytes);
             if (null != msgs[i].DisplayMessageBody && msgs[i].DisplayMessageBody.StartsWith("SMS otp is:"))
             {
                 verificationCode = msgs[i].DisplayMessageBody.Split(':')[1].Substring(0, 8).Replace("-", "");
                 Intent otpIntent = new Intent(Application.Context, typeof(MainActivity));
                 otpIntent.PutExtra("verificationCode", verificationCode.Trim());
                 otpIntent.PutExtra("fromsms", "OK");
                 otpIntent.AddFlags(ActivityFlags.NewTask | ActivityFlags.SingleTop);
                 context.StartActivity(otpIntent);
             }
         }
     }
     catch (Exception ex)
     {
         //Log.Error(Constants.APPNAME, ex.Message);
     }
 }
        public ImageListUber(global::Com.Android.Camera.Gallery.IImageList[] p0, int p1) : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_p0 = JNIEnv.NewArray(p0);;

            if (GetType() != typeof(ImageListUber))
            {
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "([Lcom/android/camera/gallery/IImageList;I)V", new JValue(native_p0), new JValue(p1)),
                    JniHandleOwnership.TransferLocalRef);
                global::Android.Runtime.JNIEnv.FinishCreateInstance(Handle, "([Lcom/android/camera/gallery/IImageList;I)V", new JValue(native_p0), new JValue(p1));
                if (p0 != null)
                {
                    JNIEnv.CopyArray(native_p0, p0);
                    JNIEnv.DeleteLocalRef(native_p0);
                }
                return;
            }

            if (id_ctor_arrayLcom_android_camera_gallery_IImageList_I == IntPtr.Zero)
            {
                id_ctor_arrayLcom_android_camera_gallery_IImageList_I = JNIEnv.GetMethodID(class_ref, "<init>", "([Lcom/android/camera/gallery/IImageList;I)V");
            }
            SetHandle(
                global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_arrayLcom_android_camera_gallery_IImageList_I, new JValue(native_p0), new JValue(p1)),
                JniHandleOwnership.TransferLocalRef);
            JNIEnv.FinishCreateInstance(Handle, class_ref, id_ctor_arrayLcom_android_camera_gallery_IImageList_I, new JValue(native_p0), new JValue(p1));
            if (p0 != null)
            {
                JNIEnv.CopyArray(native_p0, p0);
                JNIEnv.DeleteLocalRef(native_p0);
            }
        }
        public unsafe MultiByteArrayInputStream(byte[] bytesA, int offsetA, int lengthA, byte[] bytesB, int offsetB, int lengthB)
            : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            const string __id = "([BII[BII)V";

            if (((global::Java.Lang.Object) this).Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_bytesA = JNIEnv.NewArray(bytesA);
            IntPtr native_bytesB = JNIEnv.NewArray(bytesB);

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [6];
                __args [0] = new JniArgumentValue(native_bytesA);
                __args [1] = new JniArgumentValue(offsetA);
                __args [2] = new JniArgumentValue(lengthA);
                __args [3] = new JniArgumentValue(native_bytesB);
                __args [4] = new JniArgumentValue(offsetB);
                __args [5] = new JniArgumentValue(lengthB);
                var __r = _members.InstanceMethods.StartCreateInstance(__id, ((object)this).GetType(), __args);
                SetHandle(__r.Handle, JniHandleOwnership.TransferLocalRef);
                _members.InstanceMethods.FinishCreateInstance(__id, this, __args);
            } finally {
                if (bytesA != null)
                {
                    JNIEnv.CopyArray(native_bytesA, bytesA);
                    JNIEnv.DeleteLocalRef(native_bytesA);
                }
                if (bytesB != null)
                {
                    JNIEnv.CopyArray(native_bytesB, bytesB);
                    JNIEnv.DeleteLocalRef(native_bytesB);
                }
            }
        }
예제 #29
0
        public Base32(int p0, byte[] p1, bool p2) : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_p1 = JNIEnv.NewArray(p1);;

            if (GetType() != typeof(Base32))
            {
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(I[BZ)V", new JValue(p0), new JValue(native_p1), new JValue(p2)),
                    JniHandleOwnership.TransferLocalRef);
                global::Android.Runtime.JNIEnv.FinishCreateInstance(Handle, "(I[BZ)V", new JValue(p0), new JValue(native_p1), new JValue(p2));
                if (p1 != null)
                {
                    JNIEnv.CopyArray(native_p1, p1);
                    JNIEnv.DeleteLocalRef(native_p1);
                }
                return;
            }

            if (id_ctor_IarrayBZ == IntPtr.Zero)
            {
                id_ctor_IarrayBZ = JNIEnv.GetMethodID(class_ref, "<init>", "(I[BZ)V");
            }
            SetHandle(
                global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_IarrayBZ, new JValue(p0), new JValue(native_p1), new JValue(p2)),
                JniHandleOwnership.TransferLocalRef);
            JNIEnv.FinishCreateInstance(Handle, class_ref, id_ctor_IarrayBZ, new JValue(p0), new JValue(native_p1), new JValue(p2));
            if (p1 != null)
            {
                JNIEnv.CopyArray(native_p1, p1);
                JNIEnv.DeleteLocalRef(native_p1);
            }
        }
예제 #30
0
        public MapTileProviderArray(global::Osmdroid.TileProvider.TileSource.ITileSource pTileSource, global::Osmdroid.TileProvider.IRegisterReceiver aRegisterReceiver, global::Osmdroid.TileProvider.Modules.MapTileModuleProviderBase[] pTileProviderArray) : base(IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
        {
            if (Handle != IntPtr.Zero)
            {
                return;
            }

            IntPtr native_pTileProviderArray = JNIEnv.NewArray(pTileProviderArray);;

            if (GetType() != typeof(MapTileProviderArray))
            {
                SetHandle(
                    global::Android.Runtime.JNIEnv.StartCreateInstance(GetType(), "(Lorg/osmdroid/tileprovider/tilesource/ITileSource;Lorg/osmdroid/tileprovider/IRegisterReceiver;[Lorg/osmdroid/tileprovider/modules/MapTileModuleProviderBase;)V", new JValue(pTileSource), new JValue(aRegisterReceiver), new JValue(native_pTileProviderArray)),
                    JniHandleOwnership.TransferLocalRef);
                global::Android.Runtime.JNIEnv.FinishCreateInstance(Handle, "(Lorg/osmdroid/tileprovider/tilesource/ITileSource;Lorg/osmdroid/tileprovider/IRegisterReceiver;[Lorg/osmdroid/tileprovider/modules/MapTileModuleProviderBase;)V", new JValue(pTileSource), new JValue(aRegisterReceiver), new JValue(native_pTileProviderArray));
                if (pTileProviderArray != null)
                {
                    JNIEnv.CopyArray(native_pTileProviderArray, pTileProviderArray);
                    JNIEnv.DeleteLocalRef(native_pTileProviderArray);
                }
                return;
            }

            if (id_ctor_Lorg_osmdroid_tileprovider_tilesource_ITileSource_Lorg_osmdroid_tileprovider_IRegisterReceiver_arrayLorg_osmdroid_tileprovider_modules_MapTileModuleProviderBase_ == IntPtr.Zero)
            {
                id_ctor_Lorg_osmdroid_tileprovider_tilesource_ITileSource_Lorg_osmdroid_tileprovider_IRegisterReceiver_arrayLorg_osmdroid_tileprovider_modules_MapTileModuleProviderBase_ = JNIEnv.GetMethodID(class_ref, "<init>", "(Lorg/osmdroid/tileprovider/tilesource/ITileSource;Lorg/osmdroid/tileprovider/IRegisterReceiver;[Lorg/osmdroid/tileprovider/modules/MapTileModuleProviderBase;)V");
            }
            SetHandle(
                global::Android.Runtime.JNIEnv.StartCreateInstance(class_ref, id_ctor_Lorg_osmdroid_tileprovider_tilesource_ITileSource_Lorg_osmdroid_tileprovider_IRegisterReceiver_arrayLorg_osmdroid_tileprovider_modules_MapTileModuleProviderBase_, new JValue(pTileSource), new JValue(aRegisterReceiver), new JValue(native_pTileProviderArray)),
                JniHandleOwnership.TransferLocalRef);
            JNIEnv.FinishCreateInstance(Handle, class_ref, id_ctor_Lorg_osmdroid_tileprovider_tilesource_ITileSource_Lorg_osmdroid_tileprovider_IRegisterReceiver_arrayLorg_osmdroid_tileprovider_modules_MapTileModuleProviderBase_, new JValue(pTileSource), new JValue(aRegisterReceiver), new JValue(native_pTileProviderArray));
            if (pTileProviderArray != null)
            {
                JNIEnv.CopyArray(native_pTileProviderArray, pTileProviderArray);
                JNIEnv.DeleteLocalRef(native_pTileProviderArray);
            }
        }