0

I want to load top 10 most visited places from google location history. In short, I want to create array of 10 most visited places under user that uses my application. As I understood I need to use google services api and I used them in my app before, but can't find any api or tutorial how to load data from location history.

So, when I enter from my account to this website I do see places that I visited:

link to google location history

I found only this code to load my last location, but I am not sure it's related to location history in google Account, I think it's just some data of last location that is stored in my device:

        public class MainActivity extends ActionBarActivity implements
        ConnectionCallbacks, OnConnectionFailedListener {
    ...
    @Override
    public void onConnected(Bundle connectionHint) {
        mLastLocation = LocationServices.FusedLocationApi.getLastLocation(
                mGoogleApiClient);
        if (mLastLocation != null) {
            mLatitudeText.setText(String.valueOf(mLastLocation.getLatitude()));
            mLongitudeText.setText(String.valueOf(mLastLocation.getLongitude()));
        }
    }
}

The only post that I found in stackoverflow was this one: Google api to fetch the location history of a user

Community
  • 1
  • 1
  • do you want the location history from the users account, or a combined history for the app's account? – Scott Selby Sep 10 '15 at 20:11
  • I need location history from users google account, so I could learn more about users, for example what most popular place that user was visiting before he installed my application and provide suggestions for user in this area. – Ruslan Ibr Sep 10 '15 at 20:15
  • I'm pretty sure you can not do that , Google completely got rid of their Latitude app because people did not like tracking their locations and making them shareable. – Scott Selby Sep 10 '15 at 21:08
  • I know exactly that some big companies use location history information in their apps, you are right they are not sharing the data to other users but use it internally. – Ruslan Ibr Sep 11 '15 at 17:38
  • Yes, there's no API or Service that provides that data. User's location history is only visible to them in their Google account. I'm certain that the other companies you are talking about use some kind of mechanism of their own to archive user location data. – Kay_N Sep 11 '15 at 22:27

0 Answers0