本文介绍了Android版谷歌驱动器\文档API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我Dropbox的集成与我在一个小时内应用程序的SDK清楚地描述了使用的好例子。

I integrated Dropbox with my app in a matter of hours as the SDK was clearly described and had good examples of usage.

谷歌驱动器,似乎只有一个一刀切的GData SDK,这是非常沉重的(有许多依赖,它三倍我的应用程序的大小),而不是很直观,因为它是如此之低的水平。我敢肯定,这非常有意义,当你知道如何使用它,但我无法找到使用任何真正的样品我真的很挣扎。

Google Drive seems to only have a "one size fits all" Gdata SDK which is very heavy (with the many dependencies, it triples the size of my app) and not very intuitive as it is so low level. I'm sure it makes perfect sense when you know how to use it but as I cannot find any real samples of usage I am really struggling.

是否有可用的,我可以看看和学习任何示例应用程序?如果不是这样,如果任何人有上传和下载文件,以获得一个简单的例子,我开始将是多少AP preciated。

Are there any sample apps available that I can look at and learn from? If not, if anybody has a simple example of uploading and downloading files to get me started it would be much appreciated.

推荐答案

编辑:自从我们推出了谷歌驱动器SDK V2的preferred的方法是使用驱动器API(而不是文档列表API)。有一个完整的访问范围,这使您可以访问列表和读取所有的驱动文件,并可以在Android中使用,因为我们的是Android的友好!我还建议看这次谈话从谷歌IO 这解释了如何整合移动应用驱动器。

Since we launched the Google Drive SDK v2 the preferred way is to use the Drive API (and not the Document List API). There is a full-access scope which gives you access to listing and reading all the drive files and which can be used in Android apps easily since our newer client library is Android-friendly! I also recommend watching this talk from Google IO which is explains how to integrate mobile apps with Drive.

您还可以使用每个文件的范围和与推动Android应用意图整合。

You can also use the per-file scope and integrate with the Drive Android App intents.

我们来了全样本应用程序和开发导板,请留在原地。

We are coming with full sample apps and dev guides so please stay put.

这已经回答了在这太帖子

基本上目前谷歌驱动器SDK是针对Chrome网上应用店的Web应用程序。在Android上使用谷歌驱动器今天你将不得不使用的GData文档列表API。

Basically currently the Google Drive SDK is targeted at Chrome Web Store web applications. To use Google Drive on Android today you will have to use the GData Document List API.

在的GData客户端库是老年人(pre-Android的世界:)),并且不与Android打得好。正如阿兰在其他职位说明你仍然想使用的GData客户端库,或使用新的但因为它没有文档列表API服务类,你必须手动实现它。

The GData client libraries are older (pre-Android world :)) and don't play well with Android. As explained in the other post by Alain you have the choice of still trying to use the GData client library or use the newer google-api-java-client but since it doesn't have Document List API service classes you will have to manually implement it.

大概是最简单,最轻巧的选择是使用API​​的基于HTTP REST协议直接与一个良好的XML解析器。该协议是谷歌文档列表API 的文档中描述只是觉得,上面写着协议选项卡只要有code样品中的页面。

Probably the simplest and most lightweight option would be to use the HTTP based REST protocol of the API directly along with a good XML parser. The protocol is described in the documentation of the Google Document List API just find the tabs that reads "protocol" wherever there is code samples in the page.

最后选项你等到我们最终释放的东西更好,更新了与Android打得很好:)

Last option you wait until we eventually release something better and newer that plays well with Android :)

这篇关于Android版谷歌驱动器\文档API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!