在Android中下载队列 [英] Download queue in Android
本文介绍了在Android中下载队列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Android中实现下载队列的最佳方法是什么?
What's the best way to implement a download queue in Android?
我怀疑可能有一些平台类可能会做大部分工作。
I suspect there might be some platform classes that might do most of the work.
推荐答案
在Android中实现下载队列的最佳方法是什么?
What's the best way to implement a download queue in Android?
使用 IntentService
。它为您提供队列和后台线程,因此您只需将下载逻辑放在 onHandleIntent()
中即可。 请参阅此示范项目,展示这一点。
Use an IntentService
. It supplies the queue and the background thread for you, so all you have to do is put your download logic in onHandleIntent()
. See here for a sample project demonstrating this.
这篇关于在Android中下载队列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文