ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Camera functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
<Camera>.Photo (Function)
In french: <Caméra>.Photo
Captures a photo via a Camera control in an Android or iOS application. The photo is saved in the application's default directory, or in the directory specified with the WorkingDirectory property. The different options specified for the Camera control (flash, back or front camera, etc.) are taken into account.
Remark: This function can only be used with a Camera control in version 27 or higher (the "Version-26-compatible mode" option should not be checked in the "General" tab of the control description window).
Example
CAM_MyCamera.Photo(CameraPhoto_Callback)
 
INTERNAL PROCEDURE CameraPhoto_Callback(bSuccess is boolean, PhotoPath is string)
IF bSuccess = True THEN
IMG_PHOTO = PhotoPath
STC_PHOTO_PATH = PhotoPath
MyWindow.Plane = 3
ELSE
ToastDisplay("Cannot take photo." + CR + ErrorInfo())
END
END
Syntax
<Camera control>.Photo(<WLanguage procedure>)
<Camera control>: Control name
Name of the Camera control that will capture the photo.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") called when the photo is saved.
For more details on this procedure, see Parameters of the procedure used by <Camera>.Photo.
Component: wd290android.aar
Minimum version required
  • Version 27
Comments
Click [Add] to post a comment

Last update: 06/19/2023

Send a report | Local help