GoogleApiClient's enableAutoManage() needs a fragment activity but I have an activity
<p>I want to logout from google account which is integrated into my application. I have this function</p>

<pre><code>   public void logoutFromGooglePlus(Activity a) {
        GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
                .requestEmail()
                .requestProfile()
                .build();
        GoogleApiClient mGoogleApiClient = new GoogleApiClient.Builder(a.getBaseContext())
                .enableAutoManage(a /* FragmentActivity */, this /* OnConnectionFailedListener */)
                .addApi(Auth.GOOGLE_SIGN_IN_API)
                .build();
        mGoogleApiClient.connect();
        if (mGoogleApiClient.isConnected()) {
            Auth.GoogleSignInApi.signOut(mGoogleApiClient).setResultCallback(
                    new ResultCallback&lt;Status&gt;() {
                        @Override
                        public void onResult(Status status) {


                        }
                    });
        } else {
            mGoogleApiClient.connect();   // It can send user to onConnected(), call logout again from there
        }
    }
</code></pre>

<p>As you can see I need to do it in an activity but here I have a problem enableAutoManage needs a fragmentActivity as input. But I have an activity. Can I  cast activity as fragmentActivity easily?or there is some other methods to do it?
thanks</p>