Ted L
Posts: 0
Joined: Tue Feb 19, 2013 8:03 am

Camera events trigger before the picture is taken.

Hi,

I'm using the CameraService and I have two events which need to take place after the picture it taken, or at least in the background while the Camera is running.

I've tried using both the Success and the Complete events, but they both trigger my scripts before the camera even opens.

Thanks

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Camera events trigger before the picture is taken.

How did you define the events? If they are triggered before the camera opens -- what action triggers them?

Ted L
Posts: 0
Joined: Tue Feb 19, 2013 8:03 am

Camera events trigger before the picture is taken.

Hi Max,

I have these two events set up and I'd like them to run after the camera takes the pic, but before it returns to the page. The way it is now, when I try to open the camera, both of these scrips run, then the camera opens.

  1. mobilecamera1 Success Run JavaScript Handler: $("#j_20").show();

  2. mobilecamera1 Success Run JavaScript Handler: $("#j_23").hide();

    I've looked at the Phone Gap API docs and maybe the mistake I'm making is that the success or complete events are only related to the image.

    I've also tried to set a timer to delay these events, but it makes no difference.

Ted L
Posts: 0
Joined: Tue Feb 19, 2013 8:03 am

Camera events trigger before the picture is taken.

Hi Max,

It works now... bet you can't guess who's fault it was.

Yep, it was my mistake. I had it set up as an on click event and didn't remove it when I decided to test the camera success event.

I will send you a nice bottle of Vodka when my app is done, I know I must be driving you crazy :)

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Camera events trigger before the picture is taken.

Glad it's working. I'll take scotch :)

Return to “Issues”