コード例 #1
0
        static void n_OnPictureTaken_arrayBLandroid_hardware_Camera_(IntPtr jnienv, IntPtr native__this, IntPtr native_data, IntPtr native_camera)
        {
            IMyPictureCallback __this = global::Java.Lang.Object.GetObject <IMyPictureCallback> (jnienv, native__this, JniHandleOwnership.DoNotTransfer);
            Camera             camera = global::Java.Lang.Object.GetObject <Camera> (native_camera, JniHandleOwnership.DoNotTransfer);

            __this.OnPictureTaken(new JniObjectReference(native_data), camera);
        }
コード例 #2
0
        // Extension method to call Camera.takePicture() using an IMyPictureCallback instance.
        public static unsafe void TakeMyPicture(this Camera camera, Camera.IShutterCallback shutter, Camera.IPictureCallback raw, IMyPictureCallback jpeg)
        {
            const string __id = "takePicture.(Landroid/hardware/Camera$ShutterCallback;Landroid/hardware/Camera$PictureCallback;Landroid/hardware/Camera$PictureCallback;)V";

            try {
                JniArgumentValue *__args = stackalloc JniArgumentValue [3];
                __args [0] = new JniArgumentValue((shutter == null) ? IntPtr.Zero : ((global::Java.Lang.Object)shutter).Handle);
                __args [1] = new JniArgumentValue((raw == null) ? IntPtr.Zero : ((global::Java.Lang.Object)raw).Handle);
                __args [2] = new JniArgumentValue((jpeg == null) ? IntPtr.Zero : ((global::Java.Lang.Object)jpeg).Handle);
                camera.JniPeerMembers.InstanceMethods.InvokeNonvirtualVoidMethod(__id, camera, __args);
            } finally {
            }
        }