Example #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);
            }
        }
 public static DialogFragment Create(int errorCode, int requestCode)
 {
    DialogFragment fragment = new GooglePlusErrorDialogFragment();
    Bundle args = new Bundle();
    args.PutInt(GooglePlusErrorDialogFragment.ARG_ERROR_CODE, errorCode);
    args.PutInt(GooglePlusErrorDialogFragment.ARG_REQUEST_CODE, requestCode);
    fragment.SetArguments(args);
    return fragment;
 }
Example #3
0
        public static DialogFragment Create(int errorCode, int requestCode)
        {
            DialogFragment fragment = new GooglePlusErrorDialogFragment();
            Bundle         args     = new Bundle();

            args.PutInt(GooglePlusErrorDialogFragment.ARG_ERROR_CODE, errorCode);
            args.PutInt(GooglePlusErrorDialogFragment.ARG_REQUEST_CODE, requestCode);
            fragment.SetArguments(args);
            return(fragment);
        }