I’m trying to implement an application to serialize android intent and send it through a socket from client to server and deserialize it on the server.i try to serialize intent in client side with regular java serialization API but in the runtime it’s saying that the intent is not serializable.is there any solution to serialize intent and deserialize it? just i need to mention that i used kryo also for serialization and deserialization but again i faced error at deserialization time. is there any solution to this ?
BR,
Ra
I would create a new
Serializableobject and add the parts of theIntentthat you are interested in, ie, action, bundle parameters, etc.The
Intentobject itself is notSerializable.Another approach may be to write your own
Parcelimplemenation that stores the values in anotherSerializableobject type and then serialize that Object to server. You can write anIntentto aParcelusing theIntent.writeToParcel()api.