nbreunig3 nbreunig3 - 2 years ago 61
Android Question

Passing Object through intent, object can't be serializable

I have looked throughout Google and Stack Overflow and found that this should work when trying to pass an object through an Intent.

enter image description here

However I still get this error:
enter image description here

This doesn't make sense as multiple websites have said this should work. Also here is where I try to retrieve it:

enter image description here

Any help would be appreciated.

Answer Source

You can't casting your class to Serializable, you need to implement it in your class like this:

 class Horse implements Serializable{
    //Your code here
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download