I’m quite new to the server-client design
now I’m using web service to communicate between Android and Java server and suddenly come up with a weird idea…
if I implement a webservice that doesn’t response until any update is detected on the server (and the update is the response), will the trick works on:
1. using a thread to call the service during the activity to provide any update
2. using service to call the service after the activity so any update is “pushed”
I’m quite new to the server-client design now I’m using web service to communicate
Share
Afraid that will not work. Most likely your request will simply timeout before the response is returned.
To do push messaging from the server to an Android client, check out Google’s Cloud To Device Messaging framework.