Page 1 of 1

Skip image preview after taking a picture with your camera

Posted: Tue Apr 16, 2019 1:25 pm
by Tom7044357

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.


Skip image preview after taking a picture with your camera

Posted: Wed Apr 17, 2019 7:50 am
by Serhii Kulibaba

Hello Ron,

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


Skip image preview after taking a picture with your camera

Posted: Wed Apr 17, 2019 10:29 am
by Tom7044357

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.


Skip image preview after taking a picture with your camera

Posted: Wed Apr 17, 2019 1:13 pm
by Serhii Kulibaba

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?


Skip image preview after taking a picture with your camera

Posted: Wed Apr 17, 2019 2:45 pm
by Tom7044357

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();


Skip image preview after taking a picture with your camera

Posted: Thu Apr 18, 2019 8:41 am
by Serhii Kulibaba

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


Skip image preview after taking a picture with your camera

Posted: Thu Apr 18, 2019 12:04 pm
by Tom7044357

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.


Skip image preview after taking a picture with your camera

Posted: Thu Apr 18, 2019 12:51 pm
by Serhii Kulibaba

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.