1

I had integrated Google Drive in my app a few month ago but I had to stop working on it for a bit. Now, my code imports com.google.api.services.drive but all the documentation online refers to com.google.android.gms.drive.

I am confused: should I rewrite my code? What happened while I was away? Thanks.

Myoch
  • 793
  • 1
  • 6
  • 24

1 Answers1

4

These are two different APIs, the REST Api (com.google.api.services.drive) and GDAA (com.google.android.gms.drive). REST is the 'low level' networking API that sits underneath GDAA, it is also more powerful. But with REST, you have to manage the networking issues (on/off-line, waiting for response, ...) yourself, preferably in sync service.

GDAA does it for you, it resides in GooPlayServices and is supposed to simplify things. Please see this answer. If you already started with REST, do not mix these 2, otherwise you'll run into problems with latency. Also, GDAA does not support the full DRIVE scope.

There are two demos, REST and GDAA implementation of CRUD functionality that can show you the similarities/differences.

And finally, to answer 'what happened while you were away'? GDAA was built on top of the REST Api (Jan 2014), to place a layer between the REST Api and the apps. The idea was that they could push new versions of the Drive Api to the devices using the GooPlaySrvcs. And of course to add all the synchronization, networking management to shield the apps.

Good Luck

Community
  • 1
  • 1
seanpj
  • 6,735
  • 2
  • 33
  • 54
  • Thanks, now I remember: I think I had already asked myself the question at the time, and I had chosen the REST Api because I needed the full DRIVE Scope :D – Myoch Nov 05 '15 at 22:45
  • Same here. The only thing I used from GDAA is the connect() / disconnect() logic to bypass the 'UserRecoverableAuthIOException' handling on every execute() method (hacky, I admit). – seanpj Nov 05 '15 at 23:20