Official Content

An external object called Camera enables interaction with the device's photo camera. The main purpose of this external object is to invoke the Camera of the device, take a picture, and be able to use that image in the application.

This article offers a step-by-step tutorial to use this feature.

Step 1: External Object Camera

To interact with the camera, the external object named Camera has to be used.

CameraAPIExternalObj - GeneXus 18

TakePhoto: This method invokes the device's camera native application, so the user can take a picture and select it to use it in the application.

Step 2: Learn by Example


2.1. Create a Panel object:

Layout
CameraAPILayoutPane

Variable
&photo based on Image data type

Event

Event 'TakePhoto'
    &photo = Camera.TakePhoto()
Endevent 


2.2. Execution

Once the action is executed:

CameraAPIios1

After taking a picture:

CameraAPIios2

After using it:

CameraAPIios3

Scope

Generators: AppleAndroidAngular

 

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