jmpessoa / lazandroidmodulewizard

LAMW: Lazarus Android Module Wizard: Form Designer and Components development model!
246 stars 82 forks source link

jCustomCamera take photo problem #483

Open afuriza opened 1 year ago

afuriza commented 1 year ago

Code:

procedure TmdCamera.jButton1Click(Sender: TObject);
begin
  jCustomCamera1.TakePicture();
end; 

Seems it keep trying to check if the photo focused or not before taking a photo. When I move the phone to different direction, camera will refocus and I can capture the picture. But, if it think the camera is not focused, it won't capture the picture, I keep pressing the button and nothing happens.

I tried jCustomCamera1.AutoFocusOnShot := True;, still the same. Can I force it to take the picture no matter what even it's not focused?

Also, it will make app crashed if I keep the app running and phone got idle for a long time. If I show again the jForm from long idle time that contains jCustomCamera, it will crashed. Also, if I locking the screen while keep opening the jForm that contain jCustomCamera, it will crashed again after I unlocked the phone.

Tested on:

https://user-images.githubusercontent.com/17453269/210165121-418fc09c-c3c6-44ea-bdd1-662511831db3.mp4