Hi all,
Most tutorials for the Camera Control have you use the Camera Controls 'OnSelect' - which means you're tapping the screen to take the photo.
I would much rather have a 'Capture' button at the bottom of the screen to actually capture the photo
However, it seems that to do this the camera control must be selected first, and re-selected after every press of the button 'Capture' (otherwise the image doesn't capture)
Currently i have a button called 'Capture' that has this code in it's On Select (image attached)
Collect(local_photos, Camera.Photo); UpdateContext({PhotoDateTime: Now()})
Is there anything i can do to make sure the camera control is selected when a user presses the button?
That is the issue though. You have to stream. You cannot do it with .Photo.
@jhall Right...for .Photo, you are assuming someone presses the control to take a photo and capture it. So, Camera will have a photo in the buffer to use.
If you use .Stream, you can grab a photo at any point you want.
So, I apologize that I am not seeing the issue here.
Seems that if you want the user to tap the camera for a photo, then they will defintiely be selecting it. If you want to take a photo without selecting/clicking the control, then you use the stream. Either way gives you the photo.
Well, the main issue from the PowerApps team's perspective should be that no error is thrown and the DOCUMENTED setup does not work except in the exact manner described (clicking the photo).
I am unclear on the ramifications for .Stream vs. .Photo for size/transfer as I did not test yet but will tomorrow.
If you want talk about photo size be sure to check out my other thread. https://powerusers.microsoft.com/t5/General-Discussion/Camera-resolution-defined-by-control-size-Yes... It is device dependent and in some cases control size dependent.
I solved the issue with Select().
Camera OnSelect property: false
Button OnSelect property: Select(Camera);;ClearCollect(Collection1; Camera.Photo);;UpdateContext({PhotoDateTime: Now()})
When the user clicks the button, the Camera control is selected and a photo taken.
Update: It seems like the user still has to click the Camera control before clicking the button so Select() didn't help either I'm afraid.
User | Count |
---|---|
252 | |
104 | |
94 | |
50 | |
39 |