你好,我正在使用Picasso
库从URL下载图片。
URL使用https协议,在使用Picasso
下载使用https协议的图片时出现问题。
它不支持下载使用https协议的图片吗?只有在我使用http协议时才能正常工作?
我正在尝试获取使用https协议的位图。
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);
有任何想法吗?