As Google document mentioned, JobScheduler can not work in Doze mode, Unless it is in temporal windowed periodic wake-up time.
reference https://developer.android.com/training/monitoring-device-state/doze-standby?hl=en
But some people said it can work even in Doze mode... in the following link. How to schedule a job using JobScheduler only when device is not in doze (not even Maintenance window)?
Which one is true? if it can work in Job Scheduler in doze mode, can it use the network(Wifi and mobile network) in doze mode?
And jobscheduler in doze mode, will wake system? or just the app?
JobScheduler will work with the network if you add setRequiredNetworkType
irrespective of doze mode or not. Though while in doze mode it will run during the maintenance window & the OS will decide the right time.
Other than that to clarify setRequiresDeviceIdle()
is not the doze mode idle state but just another screen off state but not necessarily with doze mode active.
Check the "charging & idle" section in this article by google devs
Despite the similar naming, this job constraint is not related to the system's "device idle" or "doze" states. This constraint only determines whether a job is allowed to run while the device is directly in use.