i
This is not the latest version of this document; to access the latest version, click here.
Official Content

This Smart Devices API enables you to programmatically take photos and record videos using the device's camera.

CameraAPI

Code example

Event 'RecordVideo'
  Composite
    &Video = CameraAPI.RecordVideo()
    UploadVideo(&Video)
  EndComposite
EndEvent
Event 'TakePhoto'
  Composite
    &Image = CameraAPI.TakePhoto()
    SaveImage(&Image)
  EndComposite
EndEvent

CameraAPI Methods

TakePhoto

To take a photo using the device's camera.

Return value: Image

Parameters: None

RecordVideo

To record a video using the device's camera.

Return value: Video

Parameters: None or CameraAPIQuality data type

CameraAPIQuality: Allows you to set the quality that the video will be recorded with, affecting the file size and transfer time over the network. If this parameter is not sent, the value used is Medium.

TrimVideo

To trim a video in the device

Return value: Video

Parameters: in - Video, out - Video

Availability

See also


 

Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant