如何在 Google Drive Android API 中获取已创建文件夹的 DriveId [英] How to get DriveId of created folder in Google Drive Android API

查看:17
本文介绍了如何在 Google Drive Android API 中获取已创建文件夹的 DriveId的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Google Drive 帐户中有文件夹,我想在特定文件夹中添加文件.我该怎么做?在 示例 需要 DriveId (EXISTING_FOLDER_ID),但我不知道 DriveID 我的文件夹,我只知道名称.

I have folders on my Google Drive account and i want to add files in specific folder. How can I do it? In example needed DriveId (EXISTING_FOLDER_ID), but I don't know DriveID my folder, I know name only.

推荐答案

如果您有文件夹的元数据(或 DriveFolder 对象,您可以从中获取元数据),您只需调用 getDriveId.

If you have the metadata for the folder (or a DriveFolder object, from which you can get the metadata), you can just call getDriveId.

如果你有网络资源,你可以通过 fetchDriveId

If you have the web resource, you can get the DriveId using that resource id using fetchDriveId

这篇关于如何在 Google Drive Android API 中获取已创建文件夹的 DriveId的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆