E
E
ersh0v2019-03-24 12:01:57
Google
ersh0v, 2019-03-24 12:01:57

How to replace AuthorizationCodeInstalledApp class in Android (Google API)?

I'm trying to run the code example from Google Quickstart for Java on an Android emulator, but the code crashes on the line

return new AuthorizationCodeInstalledApp(flow, receier).authorize("user");

It turned out that Android does not support this class, so you need to manually catch the authorization URL, open it in the browser, and then push the result into the Credential object. I am familiar with Java superficially, so I have little idea how this can be implemented.
Can you please tell me how this can be done? Maybe there are some classes analogues for this kind of tasks?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question