I am try to converting image to bitmap using following bit of code:
//Here file is the image file
Bitmap bm = BitmapFactory.decodeFile(file.getAbsolutePath());
Now the problem is some times i got the OutOfMemoryError
. I don't know when the error exactly happened.
My simple solution add try catch add and avoid crash. I know it is not the right way.
How to handle OutOfMemoryError
here?