BlackBerry.Camera.TakePhoto C# (CSharp) Method

TakePhoto() public method

public TakePhoto ( ) : void
return void
        public void TakePhoto()
        {
            string bla = "bla";
            HandleError (_camera_set_photovf_property (handle,
                                                       ImageProperty.CAMERA_IMGPROP_WIN_ID,
                                                       ref bla,
                                                       ImageProperty.CAMERA_IMGPROP_END));
            HandleError (camera_start_photo_viewfinder (handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero));
            System.Threading.Thread.Sleep (3000);
            HandleError (camera_take_photo (handle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, true));
        }

Usage Example

Example #1
0
 public static void Cam()
 {
     using (var c = new Camera (Camera.Unit.Front, Camera.Mode.RW)) {
         c.TakePhoto ();
     }
     Dialog.Alert ("OMFG", "I got camera!1!1", new Button ("Ok!"));
 }