Jainendra
Jainendra

Reputation: 25143

How to share data across apps on different devices using a web Service?

I've a game application, which shows the final score of a user on finishing the game. At a time any number of users on different device can participate in the game. Now I want a mechanism by which a user will be able to see the score of other players on submit in the order of their scores.

For this I've figured out that the data of each player need to be sent to server(asp web service in my case) and the server will push the data of all player to each device. Which method out of http post, ksoap2 will be applicable for this and how can I do this? I searched on the web, I got the way on how to send data to the server using post method but I don't have idea on how to get the data on server and send the data to the app.

Upvotes: 0

Views: 120

Answers (2)

rickbear
rickbear

Reputation: 128

To push messages to other android clients from your server, have a look at Google Cloud Messaging for Android. This way you can have an event on your server that pushes out messages to the clients when changes have been made by other players.

Upvotes: 0

TheWhiteRabbit
TheWhiteRabbit

Reputation: 15758

Approach is simple

  • From game app submit scores to a Serverside component (Restlet if it REST)
  • Expose this as Service (with various option get/post/update/delete)
  • Serve the scores based on the request
  • Have a module to comunicate with the Service, RESTClient in Android App

Upvotes: 1

Related Questions