cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ukaszu
Regular Visitor

PowerApps AddMediaWithImage use ONLY camera

Hello everyone.

 

I'm developing a PowerApp application which is intended to run on a mobile and it's main purpose is to use device's camera to make photos and upload to SharePoint. I'm using AddMediaWithImage ("Media -> Add picture") control and while it works ok, I cannot make it use a camera by default. When clicking on it - it asks every single time "Do you want to 1) use camera or maybe 2) browse for files?". I don't want to browse for files, and don't want that option. When taking multiple photos it is really tedious to go through that dialog every single time.

 

I've found a setting "UseMobileCamera" which by default is "false", and set it to true (info from MicrosoftDocs: "Whether to use a mobile camera directly, when available"). Doesn't work, still asks me.

 

Then I thought, what if I disallow usage of files and only allow camera? Well, it goes straight to file browser and allows me select a file! Yes, you're reading it right. I cannot use camera anymore too, only browse files. The camera starts to work again when I add the permission for storage again. I've triple-checked that and debugged with other person if I'm not confusing things.

 

I don't want to use "Media -> Camera" control, because "Media -> Add picture" is superior in my opinion.

 

I'm actually pretty confused. Right now my test application consists only of AddMediaWithImage control and the behaviour is as described. PowerApps from Google Play Store are in the latest available version, I'm using an Android11 phone.

6 REPLIES 6
WarrenBelz
Super User
Super User

Hi @ukaszu ,

Firstly, are you referring to the below menu?

WarrenBelz_0-1645836108250.png

 

 

ukaszu
Regular Visitor

Hello,

Yes, as I said in the original post, it's "Media -> Add picture" producing "AddMediaWithImage" control which allows for 1) camera input and 2) browse for a file in phone's storage.

@ukaszu ,

Why not use a camera control ?

 

 

As I said in my first post, I don't want to use "Media -> Camera" control, because "Media -> Add picture" is superior in my opinion.

@ukaszu ,

OK - I had it the wrong way around - the issue is that Add Media Default is to select a file and your device is actually being helpful suggesting the camera directly - you do not even get this option on a PC, so it has actually saved you a step or two.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

ukaszu
Regular Visitor

Ok, but Microsoft docs from github says this: (it's also in the first post)
"UseMobileCamera" - "Whether to use a mobile camera directly, when available"

It makes no difference if I set it to true or false (it's false by default). It asks the same question every time even when true (or false). It won't take me straight to file browsing either (if I understood your post correctly).

 

Also, if it didn't prompt for camera and go directly to file selection it would be useless for my purpose. The problem is the user will take multiple photos, and only photos, won't select files. No need for additional clicks.

 

The actual bug is disallowing use of storage and allowing only camera - it goes to file selection without prompt! Camera won't work it it will only allow me to select a file from the storage (with storage DISALLOWED). Crazy. Camera starts to become an option again only when storage is allowed again. It's not non-intuitive, it's broken on Android11.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,365)