jjzjj

userAction

全部标签

android - IntentService 的意外行为

我在我的代码中使用了IntentService而不是Service,因为IntentService在onHandleIntent(Intentintent)中为我创建了一个线程,所以我不必在我的服务代码中自己创建一个Thead。我预计同一个IntentSerivce的两个Intent将并行执行,因为在IntentService中会为每个发明生成一个线程。但我的代码证明这两个Intent是按顺序执行的。这是我的IntentService代码:publicclassUpdateServiceextendsIntentService{publicstaticfinalStringTAG="H