05 Jan 2014, 19:00
Generic-user-small

andrea de luca (1 post)

Hi,

In my very first attempt to do some experimentation with KetaiCamera library, I simply compiled (without errors/warnings) the first example in the book (http://media.pragprog.com/titles/dsproc/code/Camera/CameraGettingStarted/CameraGettingStarted.pde), and installed the app on my Galaxy tab 2 10.1.

Result: the app simply doesn’t work, displaying a blank screen. Since the code is so simple, I really cannot imagine what might be wrong.. Can you help me? Thanks.

07 Jan 2014, 19:23
Generic-user-small

Paul Cerra (1 post)

I have a similar problem on two devices. One happens to be a Galaxy tab 2 10.1, same as Andrea (OP).

When I launch the app on the Galaxy Tab, I get the blank screen, too, but that’s expected because cam.start() has not yet been called. However when I tap to start the camera, the program fails - console output is as follows:

Failed to open camera for camera ID: 0:Fail to connect to camera service

When I try to launch this app on my Nexus 4, I get the blank screen, but when I tap I cause an exception that is trapped and the app force closes on the device. I don’t have the debug output handy, but it’s obvious that calling cam.start() triggers a null pointer exception. I even tried adding “cam.setCameraID(0);” in case this was necessary, but it changed nothing.

Any help welcomed!

  You must be logged in to comment