不毕加索支持下载图片,它使用HTTPS协议 [英] Doesn't Picasso support to download images which uses https protocol

查看:310
本文介绍了不毕加索支持下载图片,它使用HTTPS协议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我现在用的是毕加索库从URL下载图像。

网址:<一href="https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn2/t1.0-1/s200x200/1472865_191408954385576_14109897_n.jpg" rel="nofollow">https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn2/t1.0-1/s200x200/1472865_191408954385576_14109897_n.jpg

URL是使用https协议,这不是为我工作使用下载HTTPS协议的图像毕加索

难道不支持下载,它使用https协议的图像,它的工作对我来说只有当我使用http proctocol?

在这里,我试图让位图是使用https协议

  com.squareup.picasso.Target目标=新com.squareup.picasso.Target(){

@覆盖
公共无效onBitmapLoaded(位图位图,LoadedFrom loadedFrom){
    userProfile.setBitmap(位);
    //调用Web API来这里注册学步车
    新AudioStreetAsyncTask(getActivity(),USERPROFILE,的getString(R.string.registration_processing_message),新TaskCompleteListener(){
        @覆盖
        公共无效onTaskCompleted(字符串jsonResponse){
           Log.d(TAG,jsonResponse);
        }
    });
}

@覆盖
公共无效onBitmapFailed(绘制对象绘制){
    userProfile.setBitmap(空);
    //调用Web API来这里注册学步车
    新AudioStreetAsyncTask(getActivity(),USERPROFILE,的getString(R.string.registration_processing_message),新TaskCompleteListener(){
        @覆盖
        公共无效onTaskCompleted(字符串jsonResponse){
           Log.d(TAG,jsonResponse);
        }
    })。执行();
}

@覆盖
在prepareLoad公共无效(绘制对象绘制){}
};

。Picasso.with(getActivity())负载(imgUrl.toString())进入(目标)。
 

你知道吗?

解决方案
  

难道不支持下载,它使用https协议的图像,它的工作对我来说只有当我使用http proctocol?

我看的时候,你使用https协议,它的工作原理,甚至,但它并没有为我工作,当任何URL重定向到另一个HTTPS URL。

Hello I am using the Picasso library to download the images from URL.

URL : https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn2/t1.0-1/s200x200/1472865_191408954385576_14109897_n.jpg

URL is using https protocol, here it is not working for me to download the images of https protocol using Picasso.

Doesn't it support to download the images which uses https protocol, it worked for me only if I use http proctocol ?

Here I am trying to get bitmap which is using https protocol

com.squareup.picasso.Target target = new com.squareup.picasso.Target() {

@Override
public void onBitmapLoaded(Bitmap bitmap, LoadedFrom loadedFrom) {
    userProfile.setBitmap(bitmap);
    // call the Web API to register the walker here
    new AudioStreetAsyncTask(getActivity(), userProfile, getString(R.string.registration_processing_message), new TaskCompleteListener() {
        @Override
        public void onTaskCompleted(String jsonResponse) {
           Log.d(TAG, jsonResponse);
        }
    });
}

@Override
public void onBitmapFailed(Drawable drawable) {
    userProfile.setBitmap(null);
    // call the Web API to register the walker here
    new AudioStreetAsyncTask(getActivity(), userProfile, getString(R.string.registration_processing_message), new TaskCompleteListener() {
        @Override
        public void onTaskCompleted(String jsonResponse) {
           Log.d(TAG, jsonResponse);
        }
    }).execute();
}

@Override
public void onPrepareLoad(Drawable drawable) {}
};

Picasso.with(getActivity()).load(imgUrl.toString()).into(target);

Any idea ?

解决方案

Doesn't it support to download the images which uses https protocol, it worked for me only if I use http proctocol ?

I see it works even when you use https protocol, but it did not work for me when any URL redirect to another https URL.

这篇关于不毕加索支持下载图片,它使用HTTPS协议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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