Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
a_f:a:mobile_camera_snap_into [2022/09/01 01:23] – removed - external edit (Unknown date) 127.0.0.1a_f:a:mobile_camera_snap_into [2023/05/09 01:40] (current) sean
Line 1: Line 1:
 +{{tag>Index Action Action_List Process Mobile}}
 +====== MOBILE CAMERA SNAP INTO ======
 +
 +This action opens a camera on a mobile device that the user logged in from, allows the user to take a photo and then writes the result into the specified Picture attribute of the specified business object. Note that this action can only be used in native mobile applications – it will not work in a browser. 
 +
 +===== Syntax =====
 +
 +''MOBILE CAMERA SNAP INTO'' AttributeIdentifier()[ ''WITH'' StringLiteral() ''='' StringLiteral() ('','' StringLiteral() ''='' StringLiteral())* ]
 +
 +where AttributeIdentifier is the identifier of the attribute to write the result into (the attribute must be of the Picture Type).
 +
 +===== Example =====
 +
 +<code aim>MOBILE CAMERA SNAP INTO MyObject.MyPictureAttribute </code>
 +
 +You can also optionally specify different properties defining how the camera will behave. The following parameters can be used (see more details here: [[https://github.com/apache/cordova-plugin-camera]])
 +
 +| ''quality''             | number                                                                                                | 50    | Quality of the saved image, expressed as a range of 0-100, where 100 is typically full resolution with no loss from file compression. (Note that information about the camera's resolution is unavailable.)  |
 +| ''allowEdit''           | Boolean                                                                                               | true  | Allow simple editing of image before selection.                                                                                                                                                              |
 +| ''encodingType''        | [[https://github.com/apache/cordova-plugin-camera#module_Camera.EncodingType|EncodingType]]           | JPEG  | Choose the returned image file's encoding.                                                                                                                                                                   |
 +| ''targetWidth''         | number                                                                                                |       | Width in pixels to scale image. Must be used withtargetHeight. Aspect ratio remains constant.                                                                                                                |
 +| ''targetHeight''        | number                                                                                                |       | Height in pixels to scale image. Must be used withtargetWidth. Aspect ratio remains constant.                                                                                                                |
 +| ''correctOrientation''  | Boolean                                                                                                     | Rotate the image to correct for the orientation of the device during capture.                                                                                                                                |
 +| ''saveToPhotoAlbum''    | Boolean                                                                                                     | Save the image to the photo album on the device after capture.                                                                                                                                               |
 +| ''popoverOptions''      | [[https://github.com/apache/cordova-plugin-camera#module_CameraPopoverOptions|CameraPopoverOptions]]  |       | iOS-only options that specify popover location in iPad.                                                                                                                                                      |
 +| ''cameraDirection''     | [[https://github.com/apache/cordova-plugin-camera#module_Camera.Direction|Direction]]                 | BACK  | Choose the camera to use (front- or back-facing).                                                                                                                                                            |
 +
 +
 +
 +For example:
 +
 +<code aim>MOBILE CAMERA SNAP INTO MyObject.MyPictureAttribute WITH 
 +    'targetWidth'='100',
 +    'targetHeight'='100',
 +    'cameraDirection'='1',
 +    'allowEdit'='false' </code>
 +
 +