Android Question Camera & CameraEx problem

Penfound

Active Member
Licensed User
Longtime User
My project has a main activity that calls FTP and Camera etc.

My problem is that I keep getting errors of one sort or another whilst trying to use the CameraEx class. The simple Camera Example works fine but I need to add a little functionality for my project, i.e. Flash on and Off, lock the picture to landscape (achieved), lock the picture size to 640 x 480, and lock the image quality to 100% jpg.

The errors I'm getting with the CameraExClass example are object must be first initialized (Panel) which it is by the designer.

If that error doesn't appear then I get one about a signature not matching the expected signature.

Could someone please check out my code and let me know where I've gone wrong?

Thanks
Penfound
 
I've found the following problems:
1. You put "InitializeCamera" in activity_resume, but the layout file that contains panel1 is "cameraView, and this layout is loaded only when button1 is clicked. Cancelling initializeCamera in activity_resume solved this.
2. camEx.StartPreview - the preview starts but then it looks for the sub ...._preview, and you don't have such:
Code: Copy
CallSub2(target, event & "_preview", Data)

Correct these and continue debugging ! good luck.
 
Upvote 0
I've found the following problems:
1. You put "InitializeCamera" in activity_resume, but the layout file that contains panel1 is "cameraView, and this layout is loaded only when button1 is clicked. Cancelling initializeCamera in activity_resume solved this.
2. camEx.StartPreview - the preview starts but then it looks for the sub ...._preview, and you don't have such:
Code: Copy
CallSub2(target, event & "_preview", Data)

Correct these and continue debugging ! good luck.

Your solution almost completely cured the problem, but I had been fiddling with a few other bits in the meantime:) Most importantly your suggestions pointed in the right direction so I have a much better idea of how to use CamEx.

Wonderful, fantastic and a very big THANK YOU!!

Penfound
 
Upvote 0

Similar Threads

Back
Top