Reputation: 1293
how to deauthorize app from google plus:
Plus.AccountApi.clearDefaultAccount(mGoogleApiClient);
Plus.AccountApi.revokeAccessAndDisconnect(mGoogleApiClient)
.setResultCallback(new ResultCallback<Status>() {
onResult(Status status) {
// mGoogleApiClient is now disconnected and access has been revoked.
// Trigger app logic to comply with the developer policies
}
});
giving error : The method setResultCallback(ResultCallback) in the type PendingResult is not applicable for the arguments (new ResultCallback(){})
the code is from "https://developers.google.com/+/mobile/android/sign-in" in section "revoking access tokens and deauthorize app"
Upvotes: 1
Views: 509
Reputation: 71
onResult(Status status)
Must be :
public void onResult(Status status)
That was as simple as that for me ! That is quite bothersome that google's example code is not usable as it is... Also please check that you have imported these :
import com.google.android.gms.common.api.ResultCallback;
import com.google.android.gms.common.api.Status;
Upvotes: 1
Reputation: 20699
check, that you import the proper ResultCallback
.
the ResultCallback interface has the following signature of onResult
:
public abstract void onResult(com.google.android.gms.common.api.Result arg0);
Upvotes: 0