I'm working on an integration with Google Calendar API. In order to get the authorization to access the calendar of the specific account, I use this snippet from the Calendar-Android-Sample Project:
if (e instanceof UserRecoverableAuthIOException) {
Intent intent=((UserRecoverableAuthIOException) e).getIntent();
activity.startActivityForResult(intent, REQUEST_AUTHORIZATION);
return;
}
For some reason, the sample project returns an "access-not-configured" error message, while mine works, and I've followed the same steps taken in the sample project, perhaps it is because that mine is another project.
The problem I'm facing is to repeat the authorization step of the API, since if I have authorized the access on a device, then even if I uninstall the application from that device, the next time I install it, it is authorized and I do not need to go through the authorization step again.
For the sake of consistency, I would like to be able to revoke the authorization given to the application so that the next time I would run any API call, I would have to authorize the application.
How can this be achieved?
Thanks, Adam.