Introduction
Taking pictures can be fun! And if you can take them from within your apps, even better! One of the Power Apps controls using which users can take pictures is the Camera control (read more here).
Tip - Multiple cameras
Almost all new mobile devices typically have more than 1 camera. While you can specify the ID of the camera you want to use using the Camera property, not all devices follow the same nomenclature. 0 can be the front facing camera on some devices and can be the rear on others. So hard coding the ID is never a good idea. To get the list of available devices, set this as the Items property of a gallery (galCamera):
Camera1.AvailableDevices
Camera1 is the name of the camera control.
You can then set the ID property of the camera control to
galCamera.Selected.Id
To illustrate this, here is a quick demo on my Samsung Galaxy Note 10 Plus:
Stay tuned for the remaining 10 tips!
Recent articles
- A-Z: 26 tips! Learn how to improve your Power Apps!
- Add Picture vs Camera Control – Who is the winner?
- Background images for Power Apps screens – the right way!
- Combo box or Dropdown? - Who is the winner?
- Delegation in Power Apps – How to identify and test!
- Edit vs Display – Which is the better form?
- Formulas – How to learn the 170+ Power Apps formulas?
- Galleries vs Data Tables – How to pick between the two in Power Apps?
- Hyperlinks – How to launch web pages & apps in Power Apps!
- Icons – How to increase performance!
- Jump start – How to speed up Power Apps dev with components!
- Keyboard – How to control the keyboard type on mobile
- LastSubmit – How to fetch the last submitted record in Power Apps
- Media controls in Power Apps – How to improve user experience!
- New screens – How to speed up Power Apps dev using templates!
- OnStart – How to optimize app loading experience!
Beautiful.. thanks so much..
Thank you for your comment Rory! Am glad you liked it!
Thank you for this. What I ended up implementing was a dropdown instead so I had a smaller/cleaner UI, at least in my eyes.
That’s awesome Christopher! And yes, a dropdown would be better. I used a gallery so I could show the list easily.