Categories
android java rest sockets

How to pass data from server to android app: REST vs Sockets

I’am writing an android app that needs some data from the server. I am also writing the server side in Java.

  • What is the best way to pass data from the server to the android device: with REST or Sockets (like Kryonet)?
  • In what format: XML/JSON (for REST) or plain Java objects?

Thanks in advance.