Reputation: 855
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.
Upvotes: 1
Views: 280
Reputation: 6755
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
Upvotes: 4