Click here to Skip to main content
15,867,330 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
how can i get all the user location who are using the application ? i want to show all the user location real-time on the map . All user location will be shown to everyone who are using the application.
Posted

1) It is only possible for your own applications

2) Your app needs to send it's "location" to a global server.

3) You query the global server for users locations.

4) You show the list of locations on a map.

What have you done so far?
 
Share this answer
 
Comments
Member 11593959 9-Apr-15 11:47am    
how can i do this in android platform ? please write the code . its my academic project .
Mehdi Gholam 9-Apr-15 11:50am    
This forum is not a code writing service, homework is for your benefit not ours.
Member 11593959 9-Apr-15 12:44pm    
thank you!!!!
Code to find current Latitude and Longitude
Step 2 A from Solution 1
Java
GPSTracker gpsTracker = new GPSTracker(this);
        if (gpsTracker.canGetLocation()) {
            String stringLatitude = String.valueOf(gpsTracker.latitude);
            textview = (TextView) findViewById(R.id.fieldLatitude);
            textview.setText("Latitude: " + stringLatitude);

            String stringLongitude = String.valueOf(gpsTracker.longitude);
            textview = (TextView) findViewById(R.id.fieldLongitude);
            textview.setText("Longitude: " + stringLongitude);

            String country = gpsTracker.getCountryName(this);
            textview = (TextView) findViewById(R.id.fieldCountry);
            textview.setText("Country: " + country);

            String city = gpsTracker.getLocality(this);
            textview = (TextView) findViewById(R.id.fieldCity);
            textview.setText("City: " + city);

            String postalCode = gpsTracker.getPostalCode(this);
            textview = (TextView) findViewById(R.id.fieldPostalCode);
            textview.setText("PostalCode: " + postalCode);

            String addressLine = gpsTracker.getAddressLine(this);
            textview = (TextView) findViewById(R.id.fieldAddressLine);
            textview.setText("AddressLine: " + addressLine);
        } else {
            // can't get location
            // GPS or Network is not enabled
            // Ask user to enable GPS/network in settings
            gpsTracker.showSettingsAlert();
        }

Hope This Will Helps you.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900