I\'ve got a singe object which has three fields: two strings and a Drawable
public class MyObject implements Serializable {
private static fina
java.io.NotSerializableException: android.graphics.drawable.BitmapDrawable
This message seems pretty clear - the specific drawable instance in the photo
field is a BitmapDrawable, which wasn't designed to be serialized. Your class cannot be serialized without dealing with the non-serializable field.
If you can ensure your class will always have a BitmapDrawable
or a Bitmap, you can see this code for an example of how to handle a Bitmap
field:
android how to save a bitmap - buggy code