0

I trigger inside my JobService a IntentService which encapsulate simple tasks. How should i call jobFinished( param, false ) after my IntentService has finished and to tell the JobService he is done? Should i bind the JobService and call it directly or exist a better solution?

Happo
  • 1,375
  • 3
  • 16
  • 34
  • Possible duplicate of [Callback to jobservice from intentservcie](https://stackoverflow.com/questions/38647733/callback-to-jobservice-from-intentservcie) – Tim Aug 18 '17 at 09:41
  • @EugenPechanec I mean with task no AsyncTask. Just a task. – Happo Aug 18 '17 at 11:24
  • 1
    See my answer [here](https://stackoverflow.com/a/47875542/7292819) – Gary99 Dec 18 '17 at 20:08
  • 1
    @Eugen Pechanec don't mislead! JobService runs on UI thread. You should consider starting a worker thread to do some time consuming task, in this case onStartJob() should return true and you must call jobFinished() when you worker thread is done. (if you do a quick task on UI thread you don't have to start a worker thread and no need in calling jobFinished()) – Kirill Karmazin Feb 27 '18 at 16:28

0 Answers0