I have an application where I use devices camera.
Now I only release camera in normal flow.
@Override
public void surfaceDestroyed(SurfaceHolder surf
Out of memory error comes because the image you tried to save exeeded the limit, normally comes when you try to process a bitmap.
You can try these methods to avoid camera getting not released.
Camera myCamera;
Use logs and fing where the error occurs and
Add a try catch block and in the catch block add myCamera.stopPreview(); and myCamera.release();
Also override the ondestroy and onpause method and add myCamera.stopPreview(); and myCamera.release();
Hope this helps you or atleast gave you an idea.