Canvas Apps Controls UI

Phone camera – How to switch cameras on Power Apps mobile!

Accessing different cameras on mobile devices
Accessing different cameras on mobile devices

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

  1. A-Z: 26 tips! Learn how to improve your Power Apps!
  2. Add Picture vs Camera Control – Who is the winner?
  3. Background images for Power Apps screens – the right way!
  4. Combo box or Dropdown? - Who is the winner?
  5. Delegation in Power Apps – How to identify and test!
  6. Edit vs Display – Which is the better form?
  7. Formulas – How to learn the 170+ Power Apps formulas?
  8. Galleries vs Data Tables – How to pick between the two in Power Apps?
  9. Hyperlinks – How to launch web pages & apps in Power Apps!
  10. Icons – How to increase performance!
  11. Jump start – How to speed up Power Apps dev with components!
  12. Keyboard – How to control the keyboard type on mobile
  13. LastSubmit – How to fetch the last submitted record in Power Apps
  14. Media controls in Power Apps – How to improve user experience!
  15. New screens – How to speed up Power Apps dev using templates!
  16. OnStart – How to optimize app loading experience!

10 thoughts on “Phone camera – How to switch cameras on Power Apps mobile!”

  1. 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.

Leave a Reply