Introduction
Before reading this article, please go through some important links of the articles, mentioned below.
In PowerApps, we can add camera control.
Camera Tool
A camera tool is used to take a snap with the device's camera. The user can update photos in the data source, wherever the app is running.
Follow the steps, mentioned below, to work with the Camera app in PowerApps.
Step 1. Log in to PowerApps.
After downloading PowerApps from the Windows store, here we need a Microsoft-related organization’s Office 365 ID (MSDN, Microsoft, Skype, Office 365, etc.) to log in with it.
Step 2. Create a New App in PowerApp.
After logging in, we can see the Dashboard. Subsequently, we click on the New button.
Step 3. Choose the Blank app.
Step 4. Designing the App.
Now, let's start designing the app. On the left side, we can see the Individual Screens add our data. On the right side, we see the list of Layouts. On the top, we see the formula bar.
Subsequently, you have seen the Properties of the screen, which you selected. On the right side, we see the Add DataSource to add the external DataSource.
Step 5. Drag and Drop the Camera tool.
- Go to the Media menu and choose to drag the Camera tool.
- Place the Camera tool on the screen.
- Rename the MyCam
Step 6. Drag and Drop the Image Tool.
The Image tool is used here to store your image when you click the camera.
- Go to the Gallery and drag the vertical image only.
- Drop the Image control to the screen.
Step 7. Adding the coding.
- Add coding to the camera.
- Select the Camera control and Add this coding Collect(MyPicture, MyCam.Photo) to the OnSelect event.
- Add coding to the Image Control.
- Select the Image control and add this coding MyPicture to the Items event.
Step 8. Run the App
Output 1. Main Screen
Output 2. Click on the Camera tool. This image is stored in the image gallery.
Output 3. Whenever you click on the camera, the images are added to the image gallery.
Conclusion
I hope you understood how to add Camera Control in Microsoft PowerApps and how to run it.