0

I've couple of questions regarding JobScheduler service of Android.

First of all, how or/and when the related JobService of a JobScheduler started? For example, after I call schedule method or something else?

I'm also a bit curious about how exactly we pass a binder component to the bound JobService (Is it extracted from the ComponentName instance?).

And what's happenning to the messages queued in the JobService's message queue (not the system service JobScheduler's queue) when the app has gone (crashed, closed, stopped)?

Hope they're clear.

Thanks in advance

stdout
  • 2,471
  • 2
  • 31
  • 40
  • "how or/and when the related JobService of a JobScheduler started?" -- your `JobService` will be started when it is time for you to execute a job. "how exactly we pass a binder component to the bound JobService" -- AFAIK, you don't. "what's happenning to the messages queued in the JobService's message queue" -- [there does not appear to be such a queue](https://android.googlesource.com/platform/frameworks/base/+/android-7.0.0_r6/core/java/android/app/job/JobService.java). – CommonsWare Sep 18 '16 at 18:00
  • Then who's binding to the JobService? In other words, who is the client? In addition, for the last part of my question, I wanted to mean the Handler message queue (Sorry for that lacking) – stdout Sep 19 '16 at 19:39
  • The client is an OS process. – CommonsWare Sep 19 '16 at 19:40
  • There are two sercives here. One is the master one (the system service) and the other is the one (JobService) that we create. I agree with you the client/app is an OS process (obviously) but I couldn't figure out the JobService's client from the code I'm gonna need to implement a JobScheduler. – stdout Sep 21 '16 at 14:14
  • You would have to rummage around the AOSP source code to try to determine that. Most developers using `JobScheduler` do not care what the client is, any more than they care what specific bit of AOSP code runs their `PendingIntent` in fulfilment of `AlarmManager` events. – CommonsWare Sep 21 '16 at 14:17

0 Answers0