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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / using multiple camera ...
Power Apps
Answered

using multiple camera Controls on one app

(1) ShareShare
ReportReport
Posted on by 6

I've been building an application recently that requires the use of camera controls on multiple screens for some reason when I try to do this only the first screen I open actually allows me to use the camera. when I navigate to the next screen the camera seems to be disabled and says "Your Camera isn't set up properly, is currently in use or is improperly configured my the app maker" it almost seems like the camera control thinks that the camera control on the previous screen is still using it because when you turn the phone's screen off and on again it works (obviously I don't want my customers to have to turn their phone screen off and on again every time they want to take a picture) I've tried setting the Display Mode  property of the camera controls using variables so that they are always disabled when the screen they're on is not active however the error persists. does anyone have a fix or is this maybe something Power Apps just can't do?

Categories:
  • Verified answer
    GarethPrisk Profile Picture
    2,828 on at

    So Camera control's have a property called Camera, which is used to tell the app which camera (since many devices have multiple) to use. This defaults to 0, and is usually the rear camera on the phone.

     

    Try having this property be dynamic for each control. Something like

    If(
     App.ActiveScreen = Screen1,
     0,
     -1
    )

    This may trick the other controls into unlocking the device's camera. It may also continuously prompt to allow use of camera - not sure.

     

    Could you consolidate the Camera functionality into a single screen and route to that screen from the others? If not, I recommend trying the AddPicture control over the Camera control. It has a number of advantages, and behaves well on mobile devices. This may remedy this particular issue, as well.

  • James_Elliott Profile Picture
    6 on at

    So I tried your first idea this Morning and it works perfectly thanks for the advice @GarethPrisk 

     

  • JvandeKraats Profile Picture
    20 on at

    When you are desperate for a solution and then you come across heroes like @GarethPrisk, with a quick and practical solution. Awesome!!

    Thank you so much, you saved my day and the update of an app at a big client. Kudos!!!

  • vierglezmtiin Profile Picture
    3 on at

    This dont work for me, I'm desperate, the camera i need is "2", I worte this code on the Camera property of the Camera control. But keeps doing the same, first time you enter the screen where you have to use the camera it works perfect but once you go any other screen and come back, it doesnt work again...

    Sin título.png
  • JvandeKraats Profile Picture
    20 on at

    @vierglezmtiin Sorry to hear it's not working.
    I may have a solution to your problem, it has one drawback; but does work.
    I used a global variable and put this variable in the 'control' function of the camera.
    You can now use the variable to choose a certain camera or to turn it off by setting the variable to 0.
    When I want to use the camera control I set the variable to 2 and when I want to turn off the camera, I set the variable to 0.

    For example:
    Set(ControlCamera, 2) - Camera 2 is used
    Set(ContralCamera, 0) - the camera is off.

    One drawbeck, power apps sets the control function of a camera by default to 0 when you import an app by zipfile. So when you import an app you have to manually enter this variable in the camera control and only then publish the app

    Is this fixing your problem? Please give this a tumbs up!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @GarethPrisk @JvandeKraats @vierglezmtiin @James_Elliott ,

     

    I am having the same issue with the message 'The camera could not be started because it is in use by another app. Close any other apps and browser tabs that could be using the camera and try again. If the issue persists, restart the device'.

    I have tried the below

    If(
     App.ActiveScreen = Screen1,
     0,
     -1
    )

     However, this does not work because my camera function is not on different screens, they are in different galleries which are visible/invisible based on buttons on that 1 screen. 

     

     Im not sure if I can use variables somehow to switch off the camera on one gallery when I click on the button to access a different gallery.

     

    Any help is much appreciated, as the app cant be used with this error message covering the camera.

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard