protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.person_list_activity);

            //var options = new PlusClass.PlusOptions.Builder ().AddActivityTypes (MomentUtil.ACTIONS).Build ();
            mGoogleApiClient = new GoogleApiClient.Builder(this)
                               .AddConnectionCallbacks(this)
                               .AddOnConnectionFailedListener(this)
                               .AddApi(Android.Gms.Plus.PlusClass.API) // options)
                               .AddScope(Android.Gms.Plus.PlusClass.ScopePlusLogin)
                               .Build();

            mListItems   = new List <string>();
            mListAdapter = new ArrayAdapter <string> (this,
                                                      Android.Resource.Layout.SimpleListItem1, mListItems);
            mPersonListView = FindViewById <ListView> (Resource.Id.person_list);
            mResolvingError = savedInstanceState != null &&
                              savedInstanceState.GetBoolean(STATE_RESOLVING_ERROR, false);

            var available = GooglePlayServicesUtil.IsGooglePlayServicesAvailable(this);

            if (available != CommonStatusCodes.Success)
            {
                ShowDialog(DIALOG_GET_GOOGLE_PLAY_SERVICES);
            }

            if (Build.VERSION.SdkInt >= BuildVersionCodes.Honeycomb)
            {
                this.ActionBar.SetDisplayHomeAsUpEnabled(true);
            }
        }
コード例 #2
0
 public static async Task <IInstantAppsApiGetInstantAppDataResult> GetInstantAppDataAsync(this IInstantAppsApi api, Android.Gms.Common.Apis.GoogleApiClient apiClient)
 {
     return((await api.GetInstantAppData(apiClient)).JavaCast <IInstantAppsApiGetInstantAppDataResult>());
 }
コード例 #3
0
 public static async Task <Result.GoalsResult> ReadCurrentGoals(this IGoalsApi api, Android.Gms.Common.Apis.GoogleApiClient client, Request.GoalsReadRequest request)
 {
     return((await api.ReadCurrentGoals(client, request)).JavaCast <Result.GoalsResult> ());
 }
コード例 #4
0
 public static async Task <IResult> SetWorkAuthenticatorEnabledWithResultAsync(this IWorkAccountApi api, Android.Gms.Common.Apis.GoogleApiClient client, bool enabled)
 {
     return((await api.SetWorkAuthenticatorEnabledWithResult(client, enabled)).JavaCast <IResult>());
 }