简体   繁体   中英

Resuming IntentService from Activity

I have an IntentService in my background that already started and running. Now I want to resuming this service from my activity, Any ideas?

As per the Android Developer Site it is not possible.

This is a subclass of Service that uses a worker thread to handle all start requests, one at a time. This is the best option if you don't require that your service handle multiple requests simultaneously. All you need to do is implement onHandleIntent(), which receives the intent for each start request so you can do the background work.

For making download manger have the IntentService notify something (eg, via a Messenger) about the failed download, so you can enqueue that file sometime later once Internet access returns

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM