コード例 #1
0
ファイル: ShareActivity.cs プロジェクト: yuva2achieve/dot42
        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);
            }
        }
コード例 #2
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;
 }
コード例 #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);
        }