I have been developing the application for drawing, and I have the problem: my application has array of pages (Bitmap), and I need to save/open it. I thought that I can use mechanism of serialization, but Bitmap isn’t serializable and I don’t know how I can save array of Bitmaps into 1 file that user can change file’s location. So, please, give me advice about it. Thank you.
Share
You could do something like the second answer in Android serializable problem
Except, instead of writing to a FileOutputStream, you can write out each bitmap into a ByteArrayOutputStream. From the ByteOutputStream, get the byte array, and put the byte arrays into an array list which can then be serialized.
EDIT: direct link to the answer: https://stackoverflow.com/a/6640191/606771