Open Camera

This post is referring to Vahana 2 (beta version). To check the document for production, please go to vDesigner-v1.0

When this task executes, it opens a camera to capture the media. This task can be implemented in those apps where the user needs to capture the media (image or video) frequently.

Steps to Configure

  1. On the <<task group’s name>> page, find the Task panel.
  2. In the Task panel, search and find the Open Camera task.
  3. Drag the Open Camera task from the Task panel to the Execution panel.
  4. Under Open Camera, a group of boxes comes into view.
  5. In the boxes, configure related properties as follows:
List/Box DescriptionMandatory
Reference NameIn this box, enter the name of the task. Also, the system generates a reference name by default that you can change. Yes
Camera ModeClick this list and then select any of the following camera mode:

–> Take Picture:- This option allows you to capture the image of the object.

–> Take Video:- This option allows you to record the video of the object.
No
Default ModeClick this list and then select any of the following modes of the camera’s direction:

–> Front Camera:- This option activates the front camera of the device.

–> Back Camera:- This option activates the back camera of the device.
No
Camera ResolutionClick this list to select any of the following resolutions for the captured media (Image or video):
–> Low
–> Medium
–> High
–> HD
–> Ultra HD
No
Doc TypeIn this box, you define the type of media. The user can capture the video of that media type. You can define the media type by using the following ways:

1. By using Static function:-
You can use the Static function when you want to define a static value (for example, Aadhar) manually. To use the Static function:
a. Click in the Doc Type list to expand the smart selector.
b. In the Search box, enter Static to display the Static function.

c. In the smart selector, select the Static function to display its format.

d. In the Static function, click the second parameter to display the list of available data types.
e. In the list, select String.
f. In the Static function, click the first parameter and then write the name of doc type (for example:- aadhaar) at its place as follows:


2. By selecting entity:-
a. Click in the Doc Type list to expand the smart selector.
b. In the Search box, enter the entity’s name, and a smart selector expands.
c. In the smart selector, select the name of entity.

Yes
Doc IDIn this box, enter a unique ID (For example:- aadhr_id). The application uses this unique Doc ID to manage multiple media files of a single document at the DMS (Document Management Server) level.

Later, the application uses the same unique Doc ID to fetch the records of the media files from the database.
Yes
Doc Bundle IDIn this box, define a key. This key is referred to as the Doc Bundle ID. The Doc Bundle ID is used to group the documents on the Document Management Server.

You can define the doc bundle ID by using the following methods:
a. By using Static function
b. By selecting entity


Note:- How to use these methods is broadly described in the description of the Doc Type property.
Yes
Primary Key1In this box, define unique key that is called the Primary Identification Key. This unique key is used to upload the request to the document management server.

You can define the primary identification key by using the following methods:
a. By using Static function
b. By selecting entity


Note:- How to use these methods is broadly described in the description of the Doc Type property.
Primary Key2Read the description of Primary Key1.
Primary Key3Read the description of Primary Key1.
Base File PathIn this box, enter the path to a storage location where the application will store the media in the app storage after the “Open Camera” task captures the media.No
File Prefix NameIn this box, enter a prefix name. This prefix is automatically prefixed to the name of the media file when it is saved to the intended location.No
Min File AllowedIn this box, enter a numeric value (for example, 1). This numeric value specifies a minimum limit to capture the media of an object before saving it locally.
Upon Minimum Limit ReachThis property automatically opens the camera in preview mode after the user captures the media until the minimum limit. After the camera opens in preview mode, it allows the user to upload the media to the server.

Also, the user can delete the captured media or return to the camera to capture another media.
Do you want to upload on DMS ServerBy default, this check box is clear. When you click this check box, the app will allow the user to upload the media to the DMS server.
DeleteWhen you click this check box, the app allows you to delete the media in preview mode. After you delete the media, it is deleted from the local drive and DMS server.
Max File AllowedIn this box, enter a numeric value (for example, 5). This numeric value specifies a maximum permissible limit to capture the media of an object.No
Max File SizeIn this box, enter the maximum permissible size of a media file that the end-user can locally save.No
Duration of The Video (Ss)In this box, enter the maximum duration to capture the video. The user cannot capture the video beyond this timeframe. No
Base 64Click this check box to activate the feature that captures the media with the base-64 format.No
Upload MediaIf you click this check box, the application calls the Upload Media API to upload the media to the Document Management server.

When the Upload Media API is called, it accepts the multipart request, in addition to the media data. The media includes JPEG, PNG, GIF, PDF, DOC, DOCX, MP3, MP4, WAV, and others.
No
Delete MediaIf you click this check box, the application calls the Delete Media API to delete the media from the Document Management server.No
CropClick this check box to activate the crop feature.No
Crop TypeThis property comes into view after you click the Crop check box to select it. This property contains the following tabs:
1. Auto:-
When you click this tab, the app displays the crop box with the pre-defined size.

2. Manual:-
When you click this tab, the Box Width box and Box Height box come into view. In the Box Width box, enter the width of the crop box.

In the Box Height box, enter the height of the crop box. The Manual tab allows you to define the width and height of the crop box manually.
No
WatermarkClick this check box to activate the watermark feature. This feature displays the watermark on the captured media.No
Output LocationIn this box, you can configure the location to store the captured media at the database level. After the “Open Camera” task captures the media (image or video), the captured media file is automatically saved to the configured JSON-based location in a specific data source.

To configure the location:
–> In the Output Location box, click the application tree icon (), and the right panel displays the Output Location area.
–> In the Output Location area, click the Source list and then select a data source (For example:- Data Store).
–> After you select a data source, the right panel displays the tree of the JSON-based locations in the data source.
–> In the tree, select a location to store the captured media file.
–> After you select the location, click Select, and the output location is successfully configured.

No
Reload ElementsIn this box, configure the elements that the application will reload after the “Open Camera” task captures the media.

To configure the elements:
–> In the Reload Elements box, click the application tree icon (), and the right pane displays the Reload Elements area.
–> In the Reload Elements area, see the application tree.


–> In the application tree, select the elements that the application will reload.
–> After you select one or more elements, click Select, and the elements are successfully configured.
No
Business RuleIn this box, you can configure a business rule to determine the execution of the Open Camera task.  If the user’s action satisfies the condition in the business rule, the Open Camera task is executed.

To configure the business rule:
–> In the Business Rule box, click the application tree icon (), and the Business Rule panel opens.
–> In the Business Rule panel, click Create New to configure a new business rule.
No
  1. After you configure the related properties, click Save to configure the Open Caemra task.
Was this article helpful?
YesNo