i
This document refers to an older version. GeneXus 16 is our latest version.

CameraAPI external object

Official Content
This documentation is valid for:

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

RecordVideo Method is available since GeneXus X Evolution 3

TakePhoto Method is available since GeneXus X Evolution 2 Upgrade 7 

RecordVideo Method is available only for iOS since GeneXus X Evolution 3 Upgrade 2

See also

  • HowTo: Using CameraAPI external object in GeneXus for Smart Devices (X Evolution 2 & 3)


 

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.