Cook-E-team / Cook-E

A mobile application that helps schedule cooking with multiple recipes
GNU General Public License v3.0
2 stars 1 forks source link

Serializing large images fails #7

Closed samcrow closed 8 years ago

samcrow commented 8 years ago

When a list of Recipes is serialized into a Parcel, the current code (in branch ui-group-c) serializes each recipe image. This can create a very large Parcel. Moving the parcel around may fail with an E/JavaBinder: !!! FAILED BINDER TRANSACTION !!! error.

Based on this information, the current code probably exceeds a parcel size limit. It needs a more efficient way to share images.

One way would be to store the images on the file system in the application cache directory, and pass around a URL or path to the files. To identify images correctly, the file name could be based on a hash of the image data.

samcrow commented 8 years ago

Work on an image caching mechanism has begun. It is not trivial. I have decided to defer image handling to the next release.

samcrow commented 8 years ago

The current solution stores images on the file system, working around this issue.