Start Camera

Starts the camera.

Identifier: start_camera

Example

<start_camera id="start_cam"/>

Stop Camera

Stops the camera.

Identifier: stop_camera

Example

<stop_camera id="stop_cam"/>

Take Picture

Captures an image if the camera functionality is active.

Identifier: take_picture

Elements

  • file_path: Contains the path and filename for the image.
    • Required: Yes
    • Default Value: Empty
  • quality: Contains the settings regarding image quality.
    • Possible values: [0, 100]
    • Required: No
    • Default Value: 100
  • width: Contains the width of the image (in pixels).
    • Possible values: Numeric values
    • Required: No
    • Default Value: Contains the current image size of the camera.
  • height: Contains the height of the image (in pixels).
    • Possible values: Numeric values
    • Required: No
    • Default Value: Current height of the camera

Output

  • ERROR: If there is a problem while calling the action.
  • SUCCESS: If the action is called without any problems.
  • MEDIA_PROCESSED: If the image has been captured successfully (submitted after the "SUCCESS" command).

Examples

Minimal

<take_picture id="take_picture_location">
   <param name="file_path">#{filename}.jpg</param>
</take_picture>

All options

<take_picture id="take_picture_location" descriptor="Take picture from the current location">
   <param name="file_path">/sdcard/#{filename}.jpg</param>
   <param name="quality">70</param>
   <param name="width">480</param>
   <param name="height">640</param>
</take_picture>

Camera Zoom

Sets the zoom ratio for the camera.

Identifier: camera_zoom

Attributes

  • zoom_level: Sets the zoom level of the camera.
    • Possible values: [0, 10]
    • Required: Yes
    • Default Value: Empty

Example

<camera_zoom id="zoom_in" zoom_level="10"/>

Toggle Camera Flashlight

This action turns the flashlight on/off. However, on devices without a flashlight, this action has no effect.

Identifier: toggle_flashlight

Example

<action id="flashlight" type="toggle_flashlight" />

Camera Scan Barcode

Uses the camera feature to scan a barcode.

Identifier: camera_scan_barcode

Attributes

  • settings: Contains a path to the barcode settings file (e.g., §{mysetting.xml}§)
    • Required: Yes
    • Default value: Empty

Elements

  • white_list: Accepts elements listed in white_list_elem. All other values are ignored.

Examples

Minimal

<camera_scan_barcode id="scan_barcode">
   <settings>§{barcodeSetting-picking.xml}§</settings>
</camera_scan_barcode>

All options

<camera_scan_barcode id="scan_barcode" descriptor="Scan barcode: location and item">
   <settings>§{barcodeSetting-picking.xml}§</settings>
   <white_list>
      <white_list_elem>123456</white_list_elem>
      <white_list_elem>654321</white_list_elem>
   </white_list>
</camera_scan_barcode>