小编lui*_*i23的帖子

使用LoopJ AndroidAsyncHttp从https下载图像资源

我正在使用LoopJ AndroidAsyncHttp下载图像,但是当我尝试使用HTTPS URL时,我没有得到任何响应.码:

AsyncHttpClient client = new AsyncHttpClient();
client.get(httpsUrlString, new BinaryHttpResponseHandler(allowedContentTypes) {
    @Override
    public void onSuccess(byte[] fileData) {
        Bitmap bitmap = BitmapFactory.decodeByteArray(fileData, 0, fileData.length);
        image.setImageBitmap(bitmap);
    }
});
Run Code Online (Sandbox Code Playgroud)

https android image android-async-http

7
推荐指数
1
解决办法
2280
查看次数

标签 统计

android ×1

android-async-http ×1

https ×1

image ×1