Tuto WINDEV Mobile 25
Part 5: Android and iOS: Developing an application 121 Using the camera and displaying an image Caution! This paragraph requires a device equipped with a camera. If this is not the case, go to the next paragraph directly. Furthermore, this paragraph requires the application to be installed on the device because it is using hardware resources that are not accessible in Simulation mode. Overview We are going to manage the product photo by using the device camera. To do so, we are going to: • create a Button control to launch the camera. The photo will be retrieved in the format of an image in memory and displayed in the Image control of product. • create a Button control to select a photo from the mobile device’s album. Creating the button for taking photos ▶ To create the Button control used to take photos: 1. Open the "WIN_Product_form" window in the editor. 2. Add a Button control in the window: • On the "Creation" pane, in the "Usual controls" group, click : the control shape appears under the mouse. • Then click on the top right of the Image control to create the Button control. ▶ We will modify the Button control to associate it with an image representing a camera: 1. Select the control and open its popup menu (right click). 2. Select "Description". The description window of control is displayed. 3. In the "General" tab, click the button on the right of "Image" control. Select "Catalog" from the popup menu that is displayed. 4. The image catalog of WINDEV Mobile is opened. This catalog contains hundreds of images in different fields, formats and sizes.
Made with FlippingBook
RkJQdWJsaXNoZXIy NDQ0OA==