开发者

IntentService not getting called sometimes

开发者 https://www.devze.com 2023-01-25 11:11 出处:网络
I\'m using an IntentService to access different web service methods and update my ContentProvider. The issue I\'m seeing is that, sometimes, I send a new Intent to the IntentService but onHandleIntent

I'm using an IntentService to access different web service methods and update my ContentProvider. The issue I'm seeing is that, sometimes, I send a new Intent to the IntentService but onHandleIntent() of the IntentService is not called. And after a while, playing with the application and clicking stuff to trigger other Intents, the onHandleIntent() method is called and all the queued Intents are run.

Has anyone else encountered this problem? It seems that the IntentService gets stuck at some point. I know it is asynchronous but I still expect it to run in a tim开发者_StackOverflowely fashion. Any thoughts?


The problem was that a http request would take a long time and consequently, the other http requests would have to wait. IntentService uses only one thread at a time.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号