Android Question [SOLVED] Error trying reusing CameraExClass

makis_best

Well-Known Member
Licensed User
Longtime User
Hi

I use CameraExClass and until one point working fine.

I have a button and when I press it activate the camera.... until now everything work fine.
The camera open and I can use it.

The problem is when I press back softkey end return to previous Layout and then I try to
push the button witch activate the camera again then I get one error message end my program crash.

 

makis_best

Well-Known Member
Licensed User
Longtime User
CameraEx example doesn't have home screen, and runs fine every time I use it.
When I press back app exit.
 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
Sure I can...

B4X:
Sub Activity_Resume
    InitializeCamera
End Sub

Sub Activity_Pause (UserClosed As Boolean)
    If camEx.IsInitialized Then
        camEx.Release
    End If
End Sub
 
Upvote 0

makis_best

Well-Known Member
Licensed User
Longtime User
I find the problem... one of the five different options I use to exit from layout I didn't release the CameraExClass.
Now it is working fine.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…