1. I'm using Dropbox Android SDK for getting photos and show it into a GridView.
  2. 我正在使用Dropbox Android SDK获取照片并将其显示到GridView中。

  3. Currently, I'm using Picasso for adapter with another images resources like GPhotos, Facebook... too.
  4. 目前,我正在使用毕加索作为适配器与另一个图像资源,如GPhotos,Facebook ......。

  5. How can I get downloadable link from Dropbox's file? Or How to use Picasso load Dropbox's image?
    This is the way I get the Dropbox image:

    如何从Dropbox的文件中获取可下载的链接?或者如何使用Picasso加载Dropbox的图像?这是我获取Dropbox图像的方式:

    List<Entry> listEntry = mApi.search("/photos", ".jpg", 0, false);
    
    int i = 0;
    for (Entry entry : listEntry) {
        if (this.isRemoving()) { // Check if fragment is being removed
            return;
        }
        if (!entry.isDir) { // Check if this entry is dir or file
            i++;
            Log.e(TAG, entry + " --- " + entry.fileName() + " --- "
                    + entry.parentPath() + " --- " + entry.modified);
            final DropboxLink shareLink = mApi.share(entry.parentPath()
                    + entry.fileName());
            url = shareLink.url;
            Log.v(TAG, "shareLink: " + shareLink.url);
            // The file name I get is ImageName.JPG and path is /Photos
            // With share() the url I get looks like https://db.tt/xxxxxxxx
        }
    }
    

3 个解决方案

#1


0

I can't offer insight about using Picasso, but if you can accept the file data directly, using getFile or getThumbnail instead of share would be better.

我无法提供有关使用Picasso的见解,但如果您可以直接接受文件数据,则使用getFile或getThumbnail而不是share会更好。

If you do need a URL that Picasso can directly download from, you should use the media method instead.

如果您确实需要Picasso可以直接下载的URL,则应使用媒体方法。

更多相关文章

  1. OpenCV4Android中图像预览旋转90度的问题
  2. Android图形图像处理之Bitmap和BitmapFactory
  3. 使用android的加速度计移动图像
  4. 作物形象与毕加索相一致。
  5. 在不同状态下使用两个图像切换按钮
  6. POST json和图像到服务器android
  7. Java实现图像对比类
  8. 为可执行文件夹提供自定义图像
  9. 在扑克游戏中显示卡片的图像

随机推荐

  1. 使用Android Studio查看Android 5.x源码
  2. [Android] Eclipse Android中设置模拟器
  3. android-xml布局属性 - 随心
  4. android之四大组件之一-Activity(三)
  5. Android模拟器及编译环境安装新手入门-3
  6. Jni/C for android 技术总揽
  7. 英特尔® Android* USB 驱动程序安装说明
  8. android studio创建模拟器报错解决 emula
  9. 【Android】高效ListView
  10. linux学习笔记《一.烧写篇_android》