Showing results for 
Search instead for 
Did you mean: 
Community Champion
Community Champion

Camera control 'memory leak' and workaround

In our tests, in the Android Player (have not tried iOS), using the camera control with a StreamRate other than 0 results in the storage used by the App gradually increasing to about 2Gb - a video stream from the 'view finder' is stored on the device. It does not seem to matter how long the StreamRate is set for (we usually use 100 as this recommended in the documentation), Power Apps just continues to capture and store the video stream for as long as the camera control is active. This appears to cause some performance slow-downs on lower spec devices without lots of storage to spare.

To overcome this, you can set the StreamRate to 0, but note:

  • You will no longer be able to capture a photo using Camera.Stream, instead you must use Camera.Photo
  • Camera.Photo is only supported in the OnSelect of the Camera control itself (if you put it on a separate button, it will not capture a photo)
  • If you turn on the setting for 'Enhance Media Capture', which greatly improves performance of using SaveData/LoadData with images (which is glacial), then the OnSelect event of the Camera will not fire in Studio (making testing pretty tough) but it does work on the Android Player (have not tested other platforms as not relevant to our scenario).

Hope the above info is helpful and saves others the many hours of investigation we had to carry out to establish the nature of the bug and workarounds.


Super User
Super User

Thanks for sharing this @PaulD1.  Whilst this is something that I have not encountered, I hope that this is something that Microsoft fixes.

Helpful resources

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.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.


New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (3,668)