33
Views
1
Comments
[Camera Plugin] Use of cache memory when taking a photo using the TakePicture action
camera-plugin
Mobile icon
Forge asset by OutSystems
Application Type
Mobile

Hello guys!

We use the Camera Plugin plugin in several of our applications and we have observed that when recording a photo using the TakePicture action there is an excessive consumption of cache memory on the Android device, which increases with each use of the action. And even closing and opening the application, the cache memory still has a very relevant amount allocated to the application.

Example of using the cache after using the camera:

  • Initial: 1,28 MB
  • 1 photo: 4,07 MB
  • 2 photos: 6,46 MB
  • 3 photos: 8,94 MB
  • 4 photos: 11,35 MB
  • After closing and opening the app again: 10,38 MB

In one of our applications, the volume of photos taken daily is very large, and this has caused device performance problems after a constant increase in the use of cache memory that is not released later, reaching GBs in our case...

Any solution for this problem?

Thank you!


Amanda Campideli

 

2026-04-26 20-38-42
Paulo Solipa
Champion

Hi @Amanda Stefani Campideli 

To solve this, I think that you can use the Cordova-plugin-cache-delete.

You can create a mechanism to detect when the app goes to background with the Pause event and delete the cache or when a user takes a certain amount of photos.

If you find that this answer is the solution, please mark it as such :)

Happy coding, Amanda!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.