Android / Google + How do I know if users have friends installed the application?

I am trying to find people in the circle of users who have installed the current application.

I used the PlusSampleActivity sample application provided in the SDK and successfully managed to get a list of all the people in user circles. However, I am not sure how to get it if a person has installed the application or not. Available documentation seems very limited ...

What I found is https://developer.android.com/reference/com/google/android/gms/plus/model/people/Person.html I use the function below, but it always returns false. (I created a user who installed the application, and I see this when I visit a user’s profile on the Internet using Google +)

Is there any other API that should be used? Or is there some way to debug this better?

public abstract boolean isHasApp ()

If "true", indicates that the person installed the application, which, having made the request, and decided to expose this installation state to the caller. A value of "false" means that the installation status cannot be (it is either not installed, or the person chose to keep this information confidential).

UPDATED It seems that the hasapp field is not even included in the response? When I try the API from the link below, I will never be able to include hasapp in the response ... Any suggestions, what can I do wrong? https://developers.google.com/apis-explorer/#p/plus/v1/plus.people.get

(I sent the same question to Google groups, here )

+6
source share
1 answer

Unfortunately, the hasApp field is not populated in response - it is actually an obsolete field from an older API. The best way to match is to track the installed users in your database with their Google IDs and compare them with the IDs in the people.list response.

The documentation should be updated to reflect this soon, sorry for the confusion!

+3
source

All Articles