I am trying to read a file from google drive using my xamarin android application using google.drive.api, the latter requests Google Oauth2 ID credentials for Android to be authorized to access Google drive.
The debugging stops here :
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(
new ClientSecrets
{
ClientId = "My-Client-ID",
ClientSecret = null
},
Scopes,
"user",
CancellationToken.None,
new FileDataStore(credPath, true)).Result;
and raises and exception :
System.AggregateException: 'One or more errors occurred. (Failed to launch browser with "https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&response_type=code&client_id=MY-CLIENT-ID&redirect_uri=http%3A%2F%2F127.0.0.1%3A46401%2Fauthorize%2F&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive.readonly" for authorization. See inner exception for details.)'
Note : It worked fine when trying it on a Desktop console application using an Oauth ID for desktop app.
