Tom7044357
Posts: 0
Joined: Thu Aug 14, 2014 4:58 pm

Skip image preview after taking a picture with your camera

Hello,

I'm using the Camera service that is integrated in Appery to upload an image to my server. Everything works fine but i want to be able to make another image after my first image, but after every image that i take i get a image preview on my android (samsung galaxy s7) and apple(Iphone X) phone.

allowEdit=false doesn't change anything either.

Is there anyway that i would be able te skip the image preview and take another picture right away?

Thanks.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Skip image preview after taking a picture with your camera

Hello Ron,

What do you mean with photo preview? Do you want to take several photos without closing camera live view?

Tom7044357
Posts: 0
Joined: Thu Aug 14, 2014 4:58 pm

Skip image preview after taking a picture with your camera

Hello Serhii,

Thanks for your reply.

When i take a picture i get to see the picture first and i get 2 options: Ok or Again. Only when i choose Ok the success event from the camera service gets triggered.

I want to lose the step inbetween and i want to keep making images without the mobile device showing me the picture first, but the success events still needs to be triggered.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Skip image preview after taking a picture with your camera

Sorry, I am not sure I understand you. When exactly you don't need to see the photo? Could you provide us with some screenshots or video record with it?

Tom7044357
Posts: 0
Joined: Thu Aug 14, 2014 4:58 pm

Skip image preview after taking a picture with your camera

I never wan't to see the photo that i take.

I only want the success event from the camera service to trigger once i take a photo so that i can get the imageDataBase64 code. I can use the imageDataBase64 to upload the photo to my server in the background.

This is the javascript in my successevent:

var dataURL = data.imageDataBase64;

formData = new FormData();
var blob = dataURItoBlob(dataURL);

formData.append('imagedata', blob, 'app.png');

var request = new XMLHttpRequest();
request.open("POST", "https://urlmyapisite");
request.send(formData);

mobilecamera2.execute();

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Skip image preview after taking a picture with your camera

Yes, it triggers the success event, which you can use to upload the photo. What exactly works wrong there?

Tom7044357
Posts: 0
Joined: Thu Aug 14, 2014 4:58 pm

Skip image preview after taking a picture with your camera

I want the success event to work as soon as i take a photo without seeing the photo first on my mobile device.

If you take a photo you get to see the photo first(a preview) but i wan't to be able to keep making photo's without seeing the photo preview. I'm not sure how i'm suppose to explain this in a different way.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Skip image preview after taking a picture with your camera

You can hide the photo preview (do not show it) and call the camera service again on the success event, but there is no such functionality by default. Unfortunately, this is outside the scope of our support. Please search online for an appropriate solution.

Return to “Issues”