4

I have an activity which puts several upload processes into the queue of an IntentService. Now i would like to show a list of the pending and started uploads, and a button to stop an upload.

based on this question Asking an IntentService for information about its queue i started to implement an external queue but so far i have no idea how to stop a specific task.

Are there any better ways how to manage the queue of an IntentService?

Community
  • 1
  • 1
timoschloesser
  • 2,790
  • 4
  • 25
  • 33

2 Answers2

4

Register a BroadCastReceiver("stopUpload") in your IntentService to stop uploading when this intent is received. Trigger that intent from your activity's sendBroadcast("stopUpload").

kctang
  • 10,894
  • 8
  • 44
  • 63
2

Aren't you better off with a Service and AsyncTasks ?

Farhan
  • 1,596
  • 1
  • 19
  • 33