Android Question CameraExClass blank screen

josejad

Expert
Licensed User
Longtime User
Hi all:

I've used CameraEx in another app and the samples work perfectly for me:

But now I'm trying to implement it in a new app and I get a blank screen. I was trying to initialize the camera into a panel in a tabstrip.
I thougth this was the problem, so I tried to load into a "normal" layout. Same result. After that, I've tried:
- Remove all my classes
- Remove everything the in the manifest
- Copy the layout of the original sample to my app, blank screen
- Copy my layout to the original sample. It works
- I've deleted everything in my app to the most simple app, bit It doesn't work.

So, I've uploaded my app and I hope someone tells me: "Hey, you're silly, haven't seen this little detail?"

Thanks¡
 

Attachments

  • CVE Orange.zip
    122.5 KB · Views: 321

KZero

Active Member
Licensed User
Longtime User
you didn't add Camera_Ready Event
B4X:
Sub Camera1_Ready (Success As Boolean)
    If Success Then
        camEx.SetJpegQuality(90)
        camEx.SetContinuousAutoFocus
        camEx.CommitParameters
        camEx.StartPreview
        Log(camEx.GetPreviewSize)
    Else
        ToastMessageShow("Cannot open camera.", True)
    End If
End Sub

and don't forget to call
B4X:
Sub Activity_Pause (UserClosed As Boolean)
    If camEx.IsInitialized Then
        camEx.Release
    End If
End Sub
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
OMG¡¡

Thanks again KZero¡¡

I started moving the sample code to a class and I forgot moving that code¡¡

Thanks, four eyes see more than two¡¡
 
Upvote 0
Top