|
|
|
|
- Overview
- Control of a WINDEV Mobile window
- Creating a Camera control
- Smart control
- Available features
- Camera control in version 27 and later
- Camera control in version 26 and earlier
- Managing thumbnails
Camera control in a mobile application
Control of a WINDEV Mobile window The Camera control is used to: You can save this video or save a video snapshot. Remark: You can use the native camera of the device to record a video or take a photo ( CameraRunApp).
Creating a Camera control To create a Camera control: - On the "Creation" tab, in the "Graphic controls" group, click "Camera".
- Click at the desired location to create the control. The control appears in the editor.
To view the characteristics of the control, select "Description" in the context menu. Remarks: - A single Camera control can be used in a window.
- The Camera control exists in 2 versions:
- Mode 27 or higher: Camera control created in version 27. It allows using all the new functions and properties available from version 27 onwards (see below).
- Version-26-compatible mode: Camera control created before version 26. It uses features deprecated by Google. The "Version-26-compatible" mode, available in the control description window, is used to keep the same behavior as in previous versions. If this option is unchecked, the control will be set to mode 27 or higher.
Smart control WINDEV Mobile features a Smart control to use the camera of the device. All the main functionalities are integrated in this Smart control. It has a Button control (to be added in the window that will open the camera of the device) and a window (opened by the Button control). To add the Smart control in your window: - In the editor, open the window in which the camera button will be integrated.
- On the "Creation" tab, in the "Graphic controls" group, expand "Camera".
- Click the control that appears and then click in the window to set the position of the button. The button is created and the "WIN_Mobile_Camera_UI" window is added to the project. This window contains different planes that allow you to manage photo capture and video recording.
Camera control in version 27 and later From version 27 onwards, all new Camera controls can be handled programmatically: - via the following functions:
- via the following specific properties:
| | Camera | The Camera property is used to identify and change the camera used (back or front). | DisplayModePreview | The DisplayModePreview property gets and sets the camera preview mode. | Flash | The Flash property determines and changes the flash mode in a Camera control. | MaxZoom | The MaxZoom property is used to get the maximum zoom value that can be used for the Camera control (for the camera in use). | MinZoom | The MinZoom property is used to get the minimum zoom value that can be used for the Camera control (for the camera in use). | TapToFocus | The TapToFocus property is used to: - Determine if tap to focus is enabled in a Camera control.
- Enable or disable tap to focus in a Camera control.
| Torch | The Torch property is used to determine and change how a Camera control uses the torch. | WorkingDirectory | The WorkingDirectory property is used to: - get or change the directory used by the HTML Editor control to store the images and CSS sheets of an HTML page.
- get the directory used by the HTML Display control to store the images and CSS sheets of an HTML page.
- get the directory used by the Camera control to save photos and videos.
| Zoom | The Zoom property gets or sets the zoom value: - in an Image control.
- in a Map control.
- in an Organization Chart control.
- in a Table, TreeView Table, Pivot Table, Spreadsheet or List Box control.
- in a Word Processing control.
- in a PDF Reader control.
- in a Camera control.
- in a Diagram Editor control;
- in a window.
| ZoomWithFinger | The ZoomWithFinger property is used to: - determine if an Image or Camera control supports pinch zoom.
- enable or disable pinch zoom in an Image or Camera control.
|
Only the video being captured can be viewed in a Camera control. Audio recording: - Audio is always recorded.
- Audio recording can be enabled or disabled via the "Enable audio recording" option.
To view: Remark: If you are using a Camera control created in version 27 (or if the "Version-26-compatible" option is unchecked): Camera control in version 26 and earlier If you used the Camera control in previous versions, the control is automatically set to "Version-26-compatible" mode when you upgrade the project to version 27. In this mode: - The new properties and functions in version 27 are not available and cause a fatal error.
- When taking a photo:
- the autofocus is taken into account if it is enabled.
- the orientation of the camera is taken into account for the final orientation of the photo.
- The click code on the Camera control allows you to trigger the photo capture or to start recording a clip (and to stop).
Only the video being captured can be viewed in a Camera control. To view:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|