21
Views
1
Comments
[CameraPreview Plugin] "takeSnapshot" Action not working
Question
camerapreview-plugin
Mobile icon
Forge asset by Daniel Martins
Application Type
Mobile

Hi, I'm using the takeSnapshot action and it is not working properly, returning always a binary with 0 bytes.


takesnapshot1.png
2024-07-05 14-16-55
Daniël Kuhlmann
 
MVP

Hi Milton,

In the latest version of this plugin the action is not called takeSnapshot, but takePicture. Also the implemented JavaScript is slightly different:

CameraPreview.setFlashMode($parameters.FlashMode);

CameraPreview.takePicture({width:$parameters.maxWidth, height:$parameters.maxHeight, quality:$parameters.Quality},function(base64PictureData){

    $parameters.PictureBase64HtmlTag = 'data:image/jpeg;base64,' +base64PictureData;

    $parameters.PictureBase64 = '' +base64PictureData;

    $resolve();

});

You can download a sample mobile application that implements the plugin from the following post (the one in the reply marked as solution), to see how to properly implement all functionality.

https://www.outsystems.com/forums/discussion/20252/example-usage/

Kind regards,

Daniel


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.