I'm planning on developing an app for android that requires a back-end server to sync data with other users of the app. I'm planning on writing this server in standard java running on a unix server.
I once did this directly between two android devices, in that case I just serialized all the data needed to be sent on both ends.
However I suspect that the format that Dalvik serializes to and Java SE's format are not compatible. Is this the case? And if it is, what are my alternatives? One thing that popped into my mind was sending raw xml over a socket, but if there are better alternatives I'll be glad to hear them.
Thanks.
If you are doing a server then you should rely on something more standard like XML or JSON. I personally favor JSON. You shouldn't expect all your client to be Java friendly. Almost every mobile device support JSON. Look at Jackson library to generate your json. Then you can use Jackson again to deserialize your object.
The beauty of this solution is also stupid simple. You can look at the content by just just putting the request in your browser. Not so easy with binary data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With