Android 通过Google Play服务撤销驱动器访问权限
有没有办法撤销通过Google Play服务授予的驱动器访问权限 关于本条: 我通过我的应用程序授予了对g drive的访问权限,如下所示:Android 通过Google Play服务撤销驱动器访问权限,android,google-play-services,google-drive-android-api,Android,Google Play Services,Google Drive Android Api,有没有办法撤销通过Google Play服务授予的驱动器访问权限 关于本条: 我通过我的应用程序授予了对g drive的访问权限,如下所示: mGoogleApiClient = new GoogleApiClient.Builder(this) .addApi(Drive.API) .addScope(Drive.SCOPE_FILE) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .build();
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addApi(Drive.API)
.addScope(Drive.SCOPE_FILE)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
我的问题是,有没有一种干净的方法来撤销g驱动器访问权限
i、 无需执行credential.getToken()并对
我正在寻找类似Drive.DriveApi.revokeAccessAndDisconnect()的东西
我知道有一个适用于g plus,但我找不到适用于g drive的。
是的,有一种方法可以撤销Google Drive作用域
GoogleSignInClient googleSignInClient = buildGoogleSignInClient();
googleSignInClient.revokeAccess().addOnCompleteListener(onCompleteListener);
在哪里
有关更多信息,请查看此项
private GoogleSignInClient buildGoogleSignInClient() {
GoogleSignInOptions signInOptions =
new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestScopes(Drive.SCOPE_FILE)
.build();
return GoogleSignIn.getClient(this, signInOptions);
}