I have started using the Google+ API for android, and I have created a sign-in application following this tutorial:

https://developers.google.com/+/mobile/android/sign-in

Now, the problem is that I want to create the sign out button from a different Activity, and what i tried to do didn't really worked..

My GPlusLogin code (Activity for the Google+ Login):

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.Intent;
import android.content.IntentSender.SendIntentException;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import com.google.android.gms.common.*;
import com.google.android.gms.common.GooglePlayServicesClient.ConnectionCallbacks;
import com.google.android.gms.common.GooglePlayServicesClient.OnConnectionFailedListener;
import com.google.android.gms.plus.PlusClient;

public class GPlusLogin extends Activity implements ConnectionCallbacks, OnConnectionFailedListener{

    private static final int REQUEST_CODE_RESOLVE_ERR = 9000;
    private static final String TAG = "GPlusLogin";

    private ProgressDialog mConnectionProgressDialog;
    private PlusClient mPlusClient;
    private ConnectionResult mConnectionResult;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
        setContentView(R.layout.gplus_layout);
        mPlusClient = new PlusClient.Builder(this, this, this).setVisibleActivities("http://schemas.google.com/AddActivity", "http://schemas.google.com/BuyActivity").build();
        Bundle extras = getIntent().getExtras();
        mConnectionProgressDialog = new ProgressDialog(this);
        mConnectionProgressDialog.setMessage("Signing in...");

        if(extras!=null){
            if(extras.getString("
Edit
Report