When we have created a job, we can schedule it. We will do this from LocationTrackingService in the MeTracker.Android project. To configure the job, we will use the JobInfo.Builder class.
We will use the SetPersisted method to ensure that the job starts again after a reboot. This is why we added the RECEIVE_BOOT_COMPLETED permission earlier.
To schedule a job, at least one constraint is needed. In this case, we will use SetOverrideDeadline. This will specify that the job needs to run before the specified time (in milliseconds) has elapsed.
The SetRequiresDeviceIdle method can be used to make sure that a job only runs when the device is not being used by a user. We could pass true to the method if we wanted to make sure that we don't slow down the device when the user is using it.
The SetRequiresBatteryNotLow method can be used to specify that a job should not run when the battery level...