android remote server
<p>i'm building an android application which i want all the user of the application share information throw a php script located in my server.
<br>for example: i have a google Map and i want see all my friend's location.
each of my application's users will send his current position the the php script (the server) every numerous of seconds.
<br>i want the php script to send back to each user, the locations of all his friends.
what is the best way of doing it ?<br></p>

<p>i thought of few and will be happy to get help starting them:<br>
1. should i only send requests to the server and in the same request get an answer in return which will include all my friend's position ?<br>
2. should i make it a 2 way communication (using sockets maybe?) and whenever the server gets an update he sends it to all users? (i don't even know how to start doing it..)<br>
3. if i'm using number 2, should i have some kind of event listener which will wait and see if there's a new message from the server ?<br></p>
