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