Android Question Picture with frontal camera in android 8

Humberto

Active Member
Licensed User
The application take one picture with the back camera save , switch to frontal camera and take another picture and save the picture and exit.

This is for security application

I tested the application in android 7.1.1 and works.
When I try with android 8 it takes the first picture save is ready for the second and freeze.

I wait for more then 5 minute and if you don´t press home button the screen is freezed.

This is a transparent activity so you see the icons but you can not access them

B4X:
   camEx.TakePicture
    Wait For Camera1_PictureTaken (Data() As Byte)
If someone could help
 

Attachments

Erel

Administrator
Staff member
Licensed User
Does it work if you sleep before reopening the camera:
B4X:
Sub ChangeCamera_Click
   camEx.Release
   Sleep(1000)
   frontCamera = Not(frontCamera)
   InitializeCamera
End Sub
?
 

Humberto

Active Member
Licensed User
I had the Sleep(800) just in camera1_ready but just before the first shoot.
Now I call Sleep(800) before shoot the second and works.

Do you believe that is better the sleep command before initialize the camera or before the shooting inside camera1_ready ?

Thanks
 

Erel

Administrator
Staff member
Licensed User
You will need to test it. Worth trying with Camera2 library.
 
Top