Home > Back-end >  What does application's own process mean in android Job Scheduler
What does application's own process mean in android Job Scheduler

Time:02-26

I was going through JobScheduler API documentation, it states "This is an API for scheduling various types of jobs against the framework that will be executed in your application's own process." What does application's own process mean, does that mean application context such that when app is killed job will terminated as well?

CodePudding user response:

A process is a technical term in the realm of Operating Systems. A process is basically 1 or more threads of execution that share resources and memory. Basically a single instance of an application being run. A new thread is not a new process, but running another application would be, or running a second instance of the same application.

In general in Android an app is a single process. There are ways to launch services in separate processes, but its a very niche thing to do with limited reasons to do so.

What that does mean is that JobScheduler runs the job in the same process as the app- if the app is already running, it won't start a new instance of the app, it will run it on the existing resource. That means they can share memory and other resources with any activities or services currently running.

  • Related