I need to get current location from Google+ API for Android.
I have done everything in Google API Console, and linked my app with client ID with SHA1 and package name.
I successfully get almost data about user name, profile picture, cover picture, email...
But I have problem with location. I can't get user location.
I use this scope:
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this).addApi(Plus.API, null)
.addScope(Plus.SCOPE_PLUS_PROFILE).build();
I use this code to get profile information:
String personName = currentPerson.getDisplayName();
String userId = currentPerson.getId();
String personPhotoUrl = currentPerson.getImage().getUrl();
String personGooglePlusProfile = currentPerson.getUrl();
String email = Plus.AccountApi.getAccountName(mGoogleApiClient);
String location = currentPerson.getCurrentLocation();
String coverPhoto = currentPerson.getCover().getCoverPhoto().getUrl();
And I sucessfully get all this data, but I get null as location.
Does anyone know how to solve this problem?
It looks like
currentLocation
values are not currently available through the API.