'Takes a picture now. Without waiting for the picture to be focused.
Public Sub TakePictureNow (MyTaskIndex As Int) As ResumableSub
If MyTaskIndex <> TaskIndex Then Return False
Camera.AbortCaptures
Dim builder As JavaObject = Camera.CreateCaptureBuilder
Dim SensorOrientation As Int = GetFromCameraCharacteristic("SENSOR_ORIENTATION")
Dim front As Int = 1
If getIsFrontFacingCamera Then front = -1
Dim orientation As Int = (SensorOrientation + jcamera.GetField("lastKnownOrientation") * front + 360) Mod 360
CaptureSettingMap.Put("JPEG_ORIENTATION", orientation)
SetSettingsFromMap(builder, CaptureSettingMap)
Dim CaptureRequest As Object = Camera.AddCaptureRequest(builder)
If PrintKeys Then PrintAllKeys(CaptureRequest, "Capture Request")
'******************* IN THIS SITE: OK FOR ME, But i go to try more times...'
Sleep (150)
Wait For Camera_PictureTaken (Data() As Byte)
StartPreview(MyTaskIndex, False)
Return Data
End Sub