【发布时间】:2014-01-03 08:29:46
【问题描述】:
我正在传递 url 以从服务器获取图像,例如
getBitmapFromURL("http://abc.xyz.in/logo.jpg");
但它没有返回任何东西。说图像是私人的。所以我的问题是无论如何都要将 cookie 传递给 getBitmapFromURL() 方法。这样我就可以得到图像。或者还有其他选择吗?非常感谢。
【问题讨论】:
-
我想通过 url 传递 cookie,然后只有我可以获取数据,我该怎么办?
-
你不能直接这样做,尝试使用http连接并获取字节并将其转换为位图
-
@GirishNair 请解释一下作为答案。
-
您的问题是
is there anyway to pass the cookie to getBitmapFromURL()答案是否定的,所以您必须使用cookie 发出HTTP 发布请求才能访问它,我没有找到任何其他方式或尝试联系github.com/nostra13/Android-Universal-Image-Loader 的nostra 来为你做这个
标签: android android-image android-bitmap