No support for latest packages in Google Play Services

satyabhukarsatyabhukar USMember

Hi i tried to login to google plus using Google Play Services. After login when i retrieve people in my circle i get a callback in

public void OnPeopleLoaded(ConnectionResult status, PersonBuffer p1, string p2)
{
if(status.IsSuccess)
{
Console.WriteLine(p1.ToString());
int count = p1.Count;
var p = p1.Get(1).GetDisplayName(); // Error: No definition for Get Display Name

        }
    }

I am able to get the count of people in my circle but unable to get each person details as shown in this tutorial
I suppose it is because Google Play Service is missing several packages such as "com.google.android.gms.plus.model.people.Person" because i am unable to find any of the public methods listed here: http://developer.android.com/reference/com/google/android/gms/plus/model/people/Person.html

Could you please let me know what is the work around.

Posts

  • AlexSotoAlexSoto MXXamarin Team Xamurai

    Hello @satyabhukar‌

    Please update to latest version 18.0.0.1 of the Google Play Services component you have installed, you are looking for interface IPerson which it is inside namespace Android.Gms.Plus.Model.People

    Hope this helps

    Alex

  • satyabhukarsatyabhukar USMember

    Hi Alex,

    I am using 18.0.01 version.
    What I tried is:

    public void OnPeopleLoaded(ConnectionResult status, PersonBuffer p1, string p2)

    {

    if(status.IsSuccess)
    
            {
    
                Console.WriteLine(p1.ToString());
    
                int count = p1.Count;
    
        //https://developer.android.com/reference/com/google/android/gms/plus/model/people/PersonBuffer.html.
    
    //Referring this I should be able to use Get and retrieve Person Details but it throws compilation error.
    
                Android.Gms.Plus.Model.People.Person person = (Android.Gms.Plus.Model.People.Person)p1.Get(1); 
    
    //I tried the same with IPerson also. but it throws runtime exception
    
                string name = person.DisplayName;
    
            }
    

    }

Sign In or Register to comment.