使用 dropbox API 列出所有 dropbox 文件和文件夹,并在 android 中单击下载文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10546388/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
List all the dropbox files and folder using dropbox API and download file clicked in android
提问by Kanika
I have researched alot on google and also read the steps mentioned at www.dropbox.com, but I didn't found any way to list all the files and folders of dropbox in my application using dropbox API.. I know how to download a file from dropbox and also how to upload a file to dropbox.
我在谷歌上研究了很多,也阅读了 www.dropbox.com 上提到的步骤,但我没有找到任何方法来使用 dropbox API 在我的应用程序中列出 dropbox 的所有文件和文件夹。我知道如何下载一个文件来自保管箱以及如何将文件上传到保管箱。
But anyone pls suggest me that Is this possible to list all the files and folder of dropbox and whenever you click on any file then that file starts downloading and save into your sdcard..
但是有人请建议我,这是否可以列出 dropbox 的所有文件和文件夹,并且每当您单击任何文件时,该文件就会开始下载并保存到您的 SD 卡中。
Anyone pls help me out with some sample ....plsss
任何人请帮我一些样品....plsss
回答by Kuffs
simple sample.
简单的样本。
Entry entries = mApi.metadata(Path, 100, null, true, null);
for (Entry e : entries.contents) {
if (!e.isDeleted) {
Log.i("Is Folder",String.valueOf(e.isDir));
Log.i("Item Name",e.fileName);
}
}

