Exemplo n.º 1
0
 public void OnClick(View view)
 {
     switch (view.GetId())
     {
     case R.Ids.send_interactive_button:
         // Set sharing so that the share is started in onSignedIn.
         mSharing = true;
         mPlusClientFragment.SignIn(REQUEST_CODE_PLUS_CLIENT_FRAGMENT);
         break;
     }
 }
Exemplo n.º 2
0
        public void OnItemClick(AdapterView <object> adapterView, View view, int i, long l)
        {
            TextView textView   = (TextView)view;
            String   momentType = (String)textView.GetText();
            String   targetUrl  = MomentUtil.MOMENT_TYPES.Get(momentType);

            IItemScope target = new IItemScope_Builder()
                                .SetUrl(targetUrl)
                                .Build();

            IMoment_Builder momentBuilder = new IMoment_Builder();

            momentBuilder.SetType("http://schemas.google.com/" + momentType);
            momentBuilder.SetTarget(target);

            IItemScope result = MomentUtil.getResultFor(momentType);

            if (result != null)
            {
                momentBuilder.SetResult(result);
            }

            // Resolve the connection status, and write the moment once PlusClient is connected.
            mPendingMoments.Add(momentBuilder.Build());
            mPlusClientFragment.SignIn(REQUEST_CODE_PLUS_CLIENT_FRAGMENT);
        }
Exemplo n.º 3
0
        public void OnClick(View view)
        {
            switch (view.GetId())
            {
            case R.Ids.sign_out_button:
                resetAccountState();
                mSignInFragment.SignOut();
                break;

            case R.Ids.sign_in_button:
                mSignInFragment.SignIn(REQUEST_CODE_PLUS_CLIENT_FRAGMENT);
                break;

            case R.Ids.revoke_access_button:
                resetAccountState();
                mSignInFragment.RevokeAccessAndDisconnect();
                break;
            }
        }
Exemplo n.º 4
0
 override protected void OnResume()
 {
     base.OnResume();
     mPlusClientFragment.SignIn(REQUEST_CODE_PLUS_CLIENT_FRAGMENT);
 }