Activate QR / Barcode Scanner (or Camera) only when needed

I am using the Barcode Scanner widget ( ) in Mendix Studio Pro and it works perfectly fine for me. BUT I would like to deactivate it programmatically (or via a condition or nanoflow) so that it opens the camera and start scanning only when the user really needs it. Context: The main page of our app is split into 2 panes. The left pane allows to search through a list of records OR to scan the QR code of a record. While the right pane displays that record and allows to view, edit, approve it or create new records. Which means the Barcode Scanner widget is always part of that page (even mostly hidden in another tab if the user is searching via the table). And right now even the barcode scanner is not visible it constantly connects to the camera of the user’s PC, laptop or phone. Which is not only consuming resources. But also raises questions from some users why their camera is running all the time when they are using our App. I tried to set visibility inside Studio Pro to “false” or in CSS visibility to hidden or display to none. Of course the widget disappeared. But the camera LED is still on and indicating that the App is accessing the camera. Anyone has an idea how to control that behavior?   [EDIT 2022-06-16] Here a screenshot of the current web app to visualize better what I am trying to achieve here: basically a single page application with multiple tabs and 3 (actually 5) vertical split panes. The whole app is getting loaded once at the beginning and the user is just switching between tabs, resizing panes where necessary and searching/refreshing/creating/editing database records. Currently without any additional (sub-) pages or popups.  
1 answers

That is more a stackoverflow question:



It seems that this post was more helpfull for solving this: