Esempio n. 1
0
        public void OnSignedIn(PlusClient plusClient)
        {
            if (!mSharing)
            {
                // The share button hasn't been clicked yet.
                return;
            }

            // Reset sharing so future calls to onSignedIn don't start a share.
            mSharing = false;
            int errorCode = GooglePlusUtil.CheckGooglePlusApp(this);

            if (errorCode == GooglePlusUtil.SUCCESS)
            {
                StartActivityForResult(getInteractivePostIntent(plusClient),
                                       REQUEST_CODE_INTERACTIVE_POST);
            }
            else
            {
                // Prompt the user to install the Google+ app.
                GooglePlusErrorDialogFragment
                .Create(errorCode, REQUEST_CODE_RESOLVE_GOOGLE_PLUS_ERROR)
                .Show(GetSupportFragmentManager(), TAG_ERROR_DIALOG_FRAGMENT);
            }
        }
Esempio n. 2
0
        override public Android.App.Dialog OnCreateDialog(Bundle savedInstanceState)
        {
            Bundle args = GetArguments();

            return(GooglePlusUtil.GetErrorDialog(args.GetInt(ARG_ERROR_CODE), GetActivity(),
                                                 args.GetInt(ARG_REQUEST_CODE)));
        }