简体   繁体   English

将sdcard文档上传到android中的Google云端硬盘

[英]upload sdcard docs to Google Drive in android

From my application, I want to upload sdcard documents to google drive for a particular Gmail account. 从我的应用程序中,我想将sdcard文档上载到特定Gmail帐户的google驱动器。

I referred this documentation on google drive . 我在Google云端硬盘上引用了此文档。 But I don't understand how to do that. 但是我不知道该怎么做。 Please help me, Thanks in advance 请帮助我,在此先谢谢

I would start here Google API for java 我将从这里开始Java的Google API

Download the API and explore the documentation on how to use it. 下载API并浏览有关如何使用它的文档。 The link also provides code samples you should be able to try out and experiment with. 该链接还提供了您应该可以尝试的代码示例。 From what I've discovered in a few minutes, you first need to get authorization using OAuth 2.0 从我发现的几分钟中,您首先需要使用OAuth 2.0获得授权

Then it's just a matter using Drive.Files.insert() (which is apparently a JSON PUT) The API also allows other functionality, like listing documents, copying, deleting, etc. 然后,使用Drive.Files.insert()(显然是JSON PUT)就可以了。该API还允许其他功能,例如列出文档,复制,删除等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM