web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / List Device Camera ID
Power Apps
Unanswered

List Device Camera ID

(0) ShareShare
ReportReport
Posted on by 180

Hi everyone, hoping for some help here.

Working on a app for employees doing site visits and inspections. Basically they create an entry on a SharePoint list for the visit, record information and upload photos.

Everything is working fine but I do have one issue. I use a camera control to take photos within the app and use a Flow to attach them to the appropriate entry on the list (Side note, is there a way to do this without a flow? I couldn't figure it out)

The issue I have is with the camera ID. On app start, I set a variable called cameraIndex to 0 and use that to set which camera the app is using. I have two icons on the screen, one which increases cameraIndex by 1 and one which decreases it by 1 (to a minimum of zero.) This works fine except I have no way to know what the max camera ID of the end user's device. They can cycle through until they get an error message and then go back a step.

Is there a way I can know which camera IDs are available? It bugs me because the app is pretty polished except for this one feature I can't figure out.

Categories:
I have the same question (0)
  • mmollet Profile Picture
    3,187 on at

    You could possibly use IfError(...your code here..., -1) in your math for your button that way if it produces an error it will catch said error and auto decrease the value by 1 for you. Should surpress the error as well. Worth a shot.

  • Verified answer
    RTW Profile Picture
    180 on at

    No idea how I missed this but there is a property called AvailableDevices which,  obviously, does exactly what I need. For future reference, this is how I have it set up.

    In OnStart, I have the following

    Set(
    	cameraIndex, 
    	Min(
    		Camera1.AvailableDevices, 
    		Id
    	)
    )


    I have two buttons on the camera screen with OnSelect the following

    Set(			//Decreases cameraIndex variable by 1 to minimum available value
    	cameraIndex, 
    	Max(
    		Min(
    			Camera1.AvailableDevices, 
    			Id
    		),
    		cameraIndex -1
    	)
    )
    
    Set(			//Increases cameraIndex variable by 1 to max available value
    	cameraIndex, 
    	Min(
    		Max(
    			Camera1.AvailableDevices, 
    			Id
    		),
    		cameraIndex +1
    	)
    )


    And Camera1.Camera is set to cameraIndex

  • oyepanky Profile Picture
    361 on at

    Hi Bro,

     

    Please check out this video for camera control. 

    TimeSheet Selfie Verify Option In PowerApps || Camera Option In PowerApps - Part 15
    https://youtu.be/AnZKwrRYtcE

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard