PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Photos and videos saved
  • Backup directories
  • Required application feature
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Starts the native camera application of the device in order to record a video or to take a photo.
Notes:
  • iPhone/iPad Note: The syntax 2 that is using a non-locking call is recommended, especially from iOS 8.
  • Universal Windows 10 App CameraRunApp must be run in a thread.
  • In a WINDEV application, CameraCapture can be used to get a video or to take a photo by using the device camera.
  • This function is equivalent to VideoStartApp.
Example
sPhoto is string
sPhoto = CameraRunApp(viPictureCapture)
IF sPhoto <> "" THEN
Info("Photo saved in the file " + sPhoto)
END
nRecordingType is int

// Let the user choose the type of capture
IF Dialog("Do you want to save an image or a video?", ["An image", ...
"A video"], 1, 2, dlgIconQuestion) = 1 THEN
nRecordingType = viPictureCapture
ELSE
nRecordingType = viVideoCapture
END

// Starts the application
CameraRunApp(nRecordingType, CB_CameraRunApp)

INTERNAL PROCÉDURE CB_CameraRunApp(sPath is string)

// If the return is an empty string vide (""), an error occurred
IF sPath ~= "" THEN
Error(ErrorInfo())
RETURN
END

// Message for end of recording
Info("The file was saved here: " + sPath)
Syntax

Starting the native camera application (locking call) Hide the details

<Result> = CameraRunApp([<Type of Capture>])
<Result>: Character string
  • Full path of file where the photo or the video was saved,
  • Empty string ("") if an error occurred. To find out the error details, use ErrorInfo.
<Type of Capture>: Optional integer constant
Type of capture:
viPictureCaptureSaving a photo.
viVideoCapture
(Default value)
Capture a video sequence.

Starting the native camera application (non-locking call) Hide the details

<Result> = CameraRunApp([<Type of Capture> [, <Procedure Name>]])
<Result>: Boolean
  • True if the photo or video was saved.
  • False otherwise. To find out the error details, use ErrorInfo.
<Type of Capture>: Optional integer constant
Type of capture:
viPictureCaptureSaving a photo.
viVideoCapture
(Default value)
Capture a video sequence.
<Procedure Name>: Character string (with or without quotes)
Name of WLanguage procedure ("callback" procedure) that will be called when saving the photo or the video.
This procedure has the following format:
PROCEDURE <Procedure Name> (<Path>)

where <Path> corresponds to the backup path of image or video.
Remarks

Photos and videos saved

The parameters of the photos and videos saved (format, resolution, size) are the ones defined in the setting of native application for taking photos.
To display the photo in an image control, in the description of this image control, "Details" pane, check "Orientate according the EXIF data of image".

Backup directories

AndroidAndroid Widget In the Android applications, the photo or the video is stored on the SDCard of the device and it is automatically added to the album.
If photos must be used in your Android applications, we advise you to work with thumbnails and not with the initial photos taken by the device. To generate the thumbnails, use CameraGenerateMiniature.
iPhone/iPad In the iPhone/iPad applications:
By default:
  • the photos are saved in the "Documents" directory of application.
  • the videos are saved in the "tmp" directory of application.
For the images, you can also:
  • store the binary content of the image in a database, via a Memo item.
  • add the photo into the photo album of the device via AlbumSave. In this case, the image can be re-used via AlbumPicker.
Universal Windows 10 App In the applications in Windows Store apps mode, the photos and the videos are saved in the "TempState" directory of the application.
Universal Windows 10 App

Required application feature

The use of this function triggers the declaration of several application features in the wizard for generating the application.
Required features:
  • Microphone: This feature allows the applications to perform audio recordings.
  • WebCam: This feature allows the applications to capture videos or photos.
Components
Android wd230android.jar
Minimum required version
  • Version 22
This page is also available for…
Comments
Click [Add] to post a comment