18

It seems the currently released API is focused on Chrome store apps.

Will there be an API for Android or is it possible to use and existing API like the Google Documents list data? And if so, which URL should be used for listing/accessing files?

AndersC
  • 512
  • 1
  • 4
  • 11

3 Answers3

13

edit: with the deprecation of the docs list API, this is no longer the best solution

You can use the existing Documents List API to access Drive resources, they share the same endpoints.

pinoyyid
  • 21,499
  • 14
  • 64
  • 115
Claudio Cherubino
  • 14,896
  • 1
  • 35
  • 42
  • 1
    So bascially just add the "Google Drive" scope and use my existing implementation for google docs using v3 of the list api? :-) – AndersC Apr 24 '12 at 21:53
  • You don't need to add the Google Drive scope to use the Documents List API. Basically, if you already have a working implementation that accesses Google Docs resources you are all set. – Claudio Cherubino Apr 24 '12 at 21:56
  • Thank you. I haden't even thought of trying that, but now that I did. I see that I have 5 GB of space vs 1 GB before, so I guess that means my account is "Drive" enabled (even though I can log in using the webbrowser, because my account is not yet "enabled"). Thanks for the quick answer also. :-) – AndersC Apr 24 '12 at 22:01
  • Is there a Documents List API available which is compatible with Android? I've found this: http://code.google.com/p/gdata-java-client/ , but it specifically disclaims against Android usage and suggests instead using http://code.google.com/p/google-api-java-client/ , which doesn't provide a service implementation for Docs. – tliebeck Apr 25 '12 at 09:04
  • 3
    You can use the [gdata-java-client](http://code.google.com/p/gdata-java-client) library on Android though we do encourage using the newest client library ([google-api-java-client](http://code.google.com/p/google-api-java-client)) as it provides more lightweight dependencies; depending on your use-case, you might want to use the former, or use the latter and write data classes using some [available samples](http://code.google.com/p/google-api-java-client/wiki/APIs#Google_Data_APIs) as model. – Alain Apr 25 '12 at 16:20
  • I originally tried that but never had much look actually getting it to work with Google Docs. – AndersC Apr 26 '12 at 17:54
  • Hello @ClaudioCherubino i have one question how to create folder in google drive from my android application ? – Hardik Joshi Dec 14 '12 at 08:44
3

Here is a guide to integrate your app with Google Drive

Matt
  • 985
  • 2
  • 9
  • 22
  • From your link, it reads like this is the recommended way to access Google Drive from Android. I'm confused why this answer is at -1. – TalkLittle Nov 26 '12 at 23:20
  • Me too. I don't mind the downvotes if what I've posted is wrong, but I would like an explanation as to why. – Matt Nov 28 '12 at 13:52
  • I havent downvoted your answer, but your link is not working at all, hence your answer is not useful any more. – Lucifer Sep 08 '14 at 14:51
  • The link is now broken! – ʀᴀʜɪʟ Mar 23 '22 at 12:47
  • There's a cached version here but I have no idea if it will work anymore. https://web.archive.org/web/20210514033653/https://developers.google.com/drive/android/get-started – Matt Mar 25 '22 at 13:39
1

Unfortunately the Documents List API is mainly documented in .NET (just the oauth is in java). For the life of me I am struggling putting together the end points in the gdata jar to upload a simple file. Tried to use the .net example as a guide put couldnt find the comparable classes in java.

Matthew Ward
  • 351
  • 3
  • 12