0

I saw a really nice post on stackoverflow on the difference between GoogleApiClient and GoogleAuthUtil.

I am trying to understand where the google-api-java-client (and google-api-java-client-android) library sits with respect to GoogleApiClient in terms of accessing native google APIs.

Details on the library here https://code.google.com/p/google-api-java-client/

1) If I want to access my own endpoints API, it would appear google-api-java-client is a better approach than GoogleAuthUtil (and clearly GoogleApiClient won't help there other than perhaps just picking an account and handling play services integration/update/missing/etc dialogs).

2) for native google APIs (eg Drive, Maps, Calendar, etc), which of the two would be the recommended approach?

Thanks.

Creos
  • 2,445
  • 3
  • 27
  • 45

1 Answers1

0

google-api-java-client is meant as a set of bindings for all kinds of Java apps, not just Android. It would be appropriate to use google-api-java-client in a server, a PC app, etc. It's OK to use it on Android, but GoogleApiClient/GoogleAuthUtil provide a set of cleaner, native UIs and workflows to help get the user into a signed in state.

I believe you can use these together if you want, though I'm not aware of any samples to that effect. You would use GoogleAuthUtil to get an access token and then use that access token with google-api-java-client.

Hounshell
  • 5,321
  • 4
  • 34
  • 51