Multiple IntentService or one Service

后端 未结 3 433
醉话见心
醉话见心 2021-01-31 10:36

I\'m a little confused on the difference between IntentService and Service. I understand that IntentService has a worker queue, but is there any benefit to using multiple Intent

3条回答
  •  灰色年华
    2021-01-31 11:39

    To allow multiple tasks to run at the same time off the main thread, you need to provide a managed collection of threads. Use a ThreadPoolExecutor to manage multiple threads at the same time:

    http://developer.android.com/training/multiple-threads/create-threadpool.html

提交回复
热议问题