Callback to jobservice from intentservcie
问题 I have a jobscheduler that triggers onStartjob of Jobservice. In onStartJob, I start an intentservice to do the work. After the work is done, I want intentservice to do a callback to jobservice so that onjobfinished can be called. How can I do a callback to JobService? 回答1: You can create BroadcastReceiver and register it in your Jobservice , in onStartJob() method, using some ACTION constant (for example ACTION_DOWNLOAD_FINISHED ). This receiver will delegate all work to onJobFinished()