I keep getting this error and the error point to this code:
bitmap = BitmapFactory.decodeByteArray(pic1 , 0, pic1.length);
the picture is from the sqlite database, stored after user select the picture from directory in phone.
when i want to retrieve the picture, i got the error.
from my reading, it is because the memory leak.
Any suggestion/solution?
Update
The problem solve when I add the code below before save the image into database.
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inSampleSize = 8;
bitmap = BitmapFactory.decodeFile(path,opt);
Thanks for those who reply/answer 🙂
try this