Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

There are a few ways to solve the issue of Camera Out of Memory in Flutter for Android:

  1. Reduce image quality: You can reduce the image quality to reduce the amount of memory needed to store the image. This can be done by setting the image compression quality to a lower value.

  2. Delete old images: You can delete old images to free up memory. This can be done by setting a limit on the number of images that can be stored and then deleting the oldest ones when the limit is reached.

  3. Use a plugin: You can use a plugin like fluttercameraml_vision or camera to handle the camera functionality. These plugins have built-in memory management features that can help reduce the likelihood of running out of memory.

  4. Increase memory allocation: You can increase the amount of memory allocated to your app. This can be done by adding the following line to your AndroidManifest.xml file:

    <application android:largeheap="true" ...="" &gt;<="" p="">

This will allow your app to use more memory, which can help prevent the Camera Out of Memory issue. However, this is not recommended as it can cause other issues like slow performance and battery drain.