Almost all the google services are available in 'google play services' for android and some are still only available as java library and there are instructions to use those java libraries in android,
https://developers.google.com/api-client-library/java/google-api-java-client/oauth2#android
The above link talks about creating 'GoogleAccountCredential' using Oauth2 and to use it for 'Tasks' service.
Now I wanna follow the same flow to use the newly released, 'Google Photos API',
https://developers.google.com/photos/library/guides/get-started-java#get-library
The code snippet here,
PhotosLibrarySettings settings =
PhotosLibrarySettings.newBuilder()
.setCredentialsProvider(
FixedCredentialsProvider.create(/* Add credentials here. */))
.build();
But couldn't find any way to get the Oauth2 credentials in android in here, they both seems to be incompatible.
So in short, what should go in the 'credentialsprovider' in the above code snippet if i have to use the library in android?