Android Question Cam1_ready event does not raise

robotop

Member
Licensed User
Longtime User
Hi all, I have a simple application that captures pictures from camera. I'm using just the basic commands from Camera V2.20 library. Normally, the application runs correctly, but sometimes (while connected to B4A bridge) after uploading a new release after some bug fix, the Cam1_Ready event does not raise anymore. This behaviour continues even if I force the application to close with the application manager, then restart it. Also, in such situation, if I launch the standard Android "Photo" application, I receive a black screen with the error: "impossible to connect to the camera". Is there any way to unlock/reset the camera ? At this moment, I have to turn off (then on) the phone to restore the working conditions.
Any help will be highly appreciated, thanks.

P.S. I'm running the App on Samsung Galaxy Nexus phone
 

robotop

Member
Licensed User
Longtime User
Hi, Erel. Thanks for your answer. I actually use Camera1.Release in Activity_Pause and Camera1.Initialize(Panel1, "Cam1") in Activity_Resume. When compiling with the B4A-Bridge connected, the phone immediatly starts a new installation of the App. It's possible that the eventually running App will not be properly closed in such case ? Anyway, I'll follow your suggestion to close the old App and wait for some seconds before uploading the new one.
In case of camera lock, is there some trick to create a Camera Reset ? I have tried to make repetitive Camera1.Release - pause - Camera1.Initialize and also some Panel1.Invalidate, but without success. Please, tell me if there is a way to do this.
Thank you.
 
Upvote 0
Top