Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7651675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:34:00+00:00 2026-05-31T11:34:00+00:00

i’m building an android application which i want all the user of the application

  • 0

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.

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.

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 ?

i thought of few and will be happy to get help starting them:
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 ?
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..)
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 ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T11:34:01+00:00Added an answer on May 31, 2026 at 11:34 am

    the first method would probably be easier to implement.

    every friend while updating his location sends data to the server which can be stored in a mysql db. maybe when a person updates a location a push notification can be sent to each of his friends(c2dm for push notification is easy and effective). once the user gets the push notification, it fires a request to the server and gets the necessary data in the same response. this is a simple and reliable method to do it.

    the reply was too long for comments so i put it here.
    answer to your questions:
    1. when you send your location, its your friends who are supposed to be notified of that. so you updating and retrieving mysql data wont serve the purpose. your friends should know, that its time for them to retrieve values from mysql. hence the push notification to your friends.

    1. for a million users, if you wish to use push notifications, you might need to purchase the appropriate plans. some data can be sent along with push notifications, and if that data size is enough for you, you might not need your client to make connection with the server at all to retrieve data. which thus removes load from your server. and if data size is too big, then your client will have to contact the server. in that case your server should be able to respond to a maximum of 1,000,000 users(a rarity) http requests. which i’m not sure if your server can handle

    i hope the answer helped. do ask if you have any further queries.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want to count how many characters a certain string has in PHP, but
I have a text area in my form which accepts all possible characters from
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.