How Should I get all images(including full URL) from Dropbox using Dropbox Core API in android app?

十年热恋 提交于 2019-12-13 05:20:03

问题


I need to get all the images on Dropbox with its full URL(not only name) as I need to display images as a list in my android app.

I am using Dropbox core API and called API as following:

DropboxAPI.Entry existingEntry= mDBApi.metadata("/", 1000, null, true, null);

Using above I got all the files listed and also got its name but couldn't get full URL of each file.

Any help is highly appreciated.

Thanks in advance.


回答1:


This depends on what exactly you need to do, and if you actually need a URL, and if so, what kind of URL.

If you just need the content of the image files, you should use the getFile or getFileStream method to access the actual file content and display it as desired.

If you actually need a direct URL to the file contents, you can use media to get the URL. Note that these expire after four hours though.

If you need a longer-lived URL, e.g., for sharing, you can get the (preview) URL by using share. (You can also modify these links for other behaviors as shown here.)



来源:https://stackoverflow.com/questions/33105908/how-should-i-get-all-imagesincluding-full-url-from-dropbox-using-dropbox-core

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!