public static IntPtr FromReflectedField(IntPtr refField) { try { return(AndroidJNI.FromReflectedField(refField)); } finally { CheckException(); } }
public static string GetStringUTFChars(IntPtr str) { try { return(AndroidJNI.GetStringUTFChars(str)); } finally { CheckException(); } }
public static IntPtr GetMethodID(IntPtr obj, string name, string sig) { try { return(AndroidJNI.GetMethodID(obj, name, sig)); } finally { CheckException(); } }
public static IntPtr GetObjectArrayElement(IntPtr array, int index) { try { return(AndroidJNI.GetObjectArrayElement(array, index)); } finally { CheckException(); } }
public static IntPtr NewString(string chars) { try { return(AndroidJNI.NewString(chars)); } finally { CheckException(); } }
public static IntPtr ToByteArray(Byte[] array) { #pragma warning disable 0618 try { return(AndroidJNI.ToByteArray(array)); } finally { CheckException(); } #pragma warning restore 0618 }
public static IntPtr ToBooleanArray(bool[] array) { try { return(AndroidJNI.ToBooleanArray(array)); } finally { CheckException(); } }
public static bool CallStaticBooleanMethod(IntPtr clazz, IntPtr methodID, jvalue[] args) { try { return(AndroidJNI.CallStaticBooleanMethod(clazz, methodID, args)); } finally { CheckException(); } }
public static void SetIntField(IntPtr obj, IntPtr fieldID, Int32 val) { try { AndroidJNI.SetIntField(obj, fieldID, val); } finally { CheckException(); } }
public static Int32 GetStaticIntField(IntPtr clazz, IntPtr fieldID) { try { return(AndroidJNI.GetStaticIntField(clazz, fieldID)); } finally { CheckException(); } }
public static void CallStaticVoidMethod(IntPtr clazz, IntPtr methodID, jvalue[] args) { try { AndroidJNI.CallStaticVoidMethod(clazz, methodID, args); } finally { CheckException(); } }
public static void SetStaticIntField(IntPtr clazz, IntPtr fieldID, Int32 val) { try { AndroidJNI.SetStaticIntField(clazz, fieldID, val); } finally { CheckException(); } }
public static IntPtr NewObject(IntPtr clazz, IntPtr methodID, jvalue[] args) { try { return(AndroidJNI.NewObject(clazz, methodID, args)); } finally { CheckException(); } }
public static IntPtr FindClass(string name) { try { return(AndroidJNI.FindClass(name)); } finally { CheckException(); } }
public static bool[] FromBooleanArray(IntPtr array) { try { return(AndroidJNI.FromBooleanArray(array)); } finally { CheckException(); } }
public static bool GetBooleanField(IntPtr obj, IntPtr fieldID) { try { return(AndroidJNI.GetBooleanField(obj, fieldID)); } finally { CheckException(); } }
public static IntPtr ToObjectArray(IntPtr[] array, IntPtr type) { try { return(AndroidJNI.ToObjectArray(array, type)); } finally { CheckException(); } }
public static Int32 GetIntField(IntPtr obj, IntPtr fieldID) { try { return(AndroidJNI.GetIntField(obj, fieldID)); } finally { CheckException(); } }
public static IntPtr ToSByteArray(SByte[] array) { try { return(AndroidJNI.ToSByteArray(array)); } finally { CheckException(); } }
public static void CallVoidMethod(IntPtr obj, IntPtr methodID, jvalue[] args) { try { AndroidJNI.CallVoidMethod(obj, methodID, args); } finally { CheckException(); } }
public static IntPtr ToIntArray(Int32[] array) { try { return(AndroidJNI.ToIntArray(array)); } finally { CheckException(); } }
public static Int32 CallIntMethod(IntPtr obj, IntPtr methodID, jvalue[] args) { try { return(AndroidJNI.CallIntMethod(obj, methodID, args)); } finally { CheckException(); } }
public static int GetArrayLength(IntPtr array) { try { return(AndroidJNI.GetArrayLength(array)); } finally { CheckException(); } }
public static float[] FromFloatArray(IntPtr array) { try { return(AndroidJNI.FromFloatArray(array)); } finally { CheckException(); } }
public static IntPtr NewStringUTF(string bytes) { try { return(AndroidJNI.NewStringUTF(bytes)); } finally { CheckException(); } }
public static Int16[] FromShortArray(IntPtr array) { try { return(AndroidJNI.FromShortArray(array)); } finally { CheckException(); } }
public static IntPtr GetObjectClass(IntPtr ptr) { try { return(AndroidJNI.GetObjectClass(ptr)); } finally { CheckException(); } }
public static SByte[] FromSByteArray(IntPtr array) { try { return(AndroidJNI.FromSByteArray(array)); } finally { CheckException(); } }
public static IntPtr GetFieldID(IntPtr clazz, string name, string sig) { try { return(AndroidJNI.GetFieldID(clazz, name, sig)); } finally { CheckException(); } }
public static ArrayType ConvertFromJNIArray <ArrayType>(IntPtr array) { Type elementType = typeof(ArrayType).GetElementType(); ArrayType result; if (AndroidReflection.IsPrimitive(elementType)) { if (elementType == typeof(int)) { result = (ArrayType)((object)AndroidJNISafe.FromIntArray(array)); } else if (elementType == typeof(bool)) { result = (ArrayType)((object)AndroidJNISafe.FromBooleanArray(array)); } else if (elementType == typeof(byte)) { result = (ArrayType)((object)AndroidJNISafe.FromByteArray(array)); } else if (elementType == typeof(short)) { result = (ArrayType)((object)AndroidJNISafe.FromShortArray(array)); } else if (elementType == typeof(long)) { result = (ArrayType)((object)AndroidJNISafe.FromLongArray(array)); } else if (elementType == typeof(float)) { result = (ArrayType)((object)AndroidJNISafe.FromFloatArray(array)); } else if (elementType == typeof(double)) { result = (ArrayType)((object)AndroidJNISafe.FromDoubleArray(array)); } else if (elementType == typeof(char)) { result = (ArrayType)((object)AndroidJNISafe.FromCharArray(array)); } else { result = default(ArrayType); } } else if (elementType == typeof(string)) { int arrayLength = AndroidJNISafe.GetArrayLength(array); string[] array2 = new string[arrayLength]; for (int i = 0; i < arrayLength; i++) { IntPtr objectArrayElement = AndroidJNI.GetObjectArrayElement(array, i); array2[i] = AndroidJNISafe.GetStringUTFChars(objectArrayElement); AndroidJNISafe.DeleteLocalRef(objectArrayElement); } result = (ArrayType)((object)array2); } else { if (elementType != typeof(AndroidJavaObject)) { throw new Exception("JNI: Unknown generic array type '" + elementType + "'"); } int arrayLength2 = AndroidJNISafe.GetArrayLength(array); AndroidJavaObject[] array3 = new AndroidJavaObject[arrayLength2]; for (int j = 0; j < arrayLength2; j++) { IntPtr objectArrayElement2 = AndroidJNI.GetObjectArrayElement(array, j); array3[j] = new AndroidJavaObject(objectArrayElement2); AndroidJNISafe.DeleteLocalRef(objectArrayElement2); } result = (ArrayType)((object)array3); } return(result); }