Reputation: 7179
I was able to upload a picture to my Google Drive with this example based on the Google Drive SDK. My problem now is that the authorizattion request (the activity where is displayed which permissions the app has) is called indirectly by this code:
private static Drive service;
try
{
// ...
File file = service.files().insert(body, mediaContent).execute();
//...
}
catch (UserRecoverableAuthIOException e)
{
startActivityForResult(e.getIntent(), REQUEST_AUTHORIZATION);
}
I want to show this activity without creating an exception. Can I call this activity from a method of the service object?
Upvotes: 0
Views: 68
Reputation: 9213
There is no way to start this activity without handling UserRecoverableAuthIOException
or UserRecoverableAuthException
.
Upvotes: 1