As our typical old asynctask network connection is getting replaced by volley. It's fast as I have used so I know. I downloaded images and showed. When I again restarted the app it didn't take time to download. So is it caching images for sometime ? And as it is recommended not to use in heavy download, any reason ? Or it is the reason that it keeps images and all in memory ? I saw I/O video of volley. But I need clear explanation. Thanks
因为我们典型的旧的asynctask网络连接正在被凌空取代。我用得很快,所以我知道。我下载了图片并显示。当我再次重新启动应用程序时,它没有花时间下载。那么有时候缓存图像吗?并且因为建议不要在大量下载中使用,任何原因?或者它保留图像和所有内存的原因?我看到了凌空的I / O视频。但我需要明确的解释。谢谢
2 个解决方案
#1
I mostly use Volley for only GET, POST api calls because Volley holds all responses in memory during parsing. For large download operations, consider using an alternative like DownloadManager. Source: https://developer.android.com/training/volley/index.html
我主要使用Volley只进行GET,POST api调用,因为Volley在解析期间将所有响应保存在内存中。对于大型下载操作,请考虑使用类似DownloadManager的替代方法。资料来源:https://developer.android.com/training/volley/index.html
#2
I have used Volley in one project and it was simple for normal POST,GET but I think that I had quite some problems when I tried to upload an image. So I would say that is quite good for making just POST,GET where you don't transfer a lot of data.
我在一个项目中使用过Volley,对于正常的POST,GET很简单,但我认为当我尝试上传图像时遇到了一些问题。所以我想说,只做POST,GET,你不需要传输大量数据。
#1
I mostly use Volley for only GET, POST api calls because Volley holds all responses in memory during parsing. For large download operations, consider using an alternative like DownloadManager. Source: https://developer.android.com/training/volley/index.html
我主要使用Volley只进行GET,POST api调用,因为Volley在解析期间将所有响应保存在内存中。对于大型下载操作,请考虑使用类似DownloadManager的替代方法。资料来源:https://developer.android.com/training/volley/index.html
#2
I have used Volley in one project and it was simple for normal POST,GET but I think that I had quite some problems when I tried to upload an image. So I would say that is quite good for making just POST,GET where you don't transfer a lot of data.
我在一个项目中使用过Volley,对于正常的POST,GET很简单,但我认为当我尝试上传图像时遇到了一些问题。所以我想说,只做POST,GET,你不需要传输大量数据。