I have a Rails server, and I want my Java desktop application & android app to be able to interact with the standard scaffold (new/ edit/ show/ etc) so I can sync data between everything.
I found this (link) which shows the basic idea but not the actual code..
The catch is that the user needs to be logged in with devise, so they only see their data, not mine or yours!
Please help me regarding this.
JSON will better for android apps. Its lightweight than XML.
when you are connecting to a server. each request will be webservice call to the server. you can send the authentication in the header in Base64 encoded form. so each request is parsed in the server and the credentials can be decoded and authenticated before serving the response.
To identify the device you can send the devices IME number. you can have a table to keep track of the devices that log into your server.
check this question for detail
For the base64 authentication in the client side using json. i haven’t done with xml.
Edit yes username and password pre set. use a screen like preference screen to set it. can refer json.org for parsing and creating json. yes can create nested jsons.