Can JobScheduler in Doze mode can connect network?

44
January 11, 2019, at 11:10 PM

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?

Answer 1

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

Official doc

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.

READ ALSO
Cannot resolve symbol 'googleMap'

Cannot resolve symbol 'googleMap'

Hi i have a little problem with Google Maps APISo i followed this instruction https://developers

50
How to show a popup message after 1 min that any response is not coming from a server?

How to show a popup message after 1 min that any response is not coming from a server?

In below code, I am getting the response from a server, before getting the response from the server, I am giving 1 min timer to get the response

63
The application does not install a second time

The application does not install a second time

I sign the APK, I choose the type of Debug, I distribute it directly, I will not upload it to Google Play

55
How do you debug android platform source code?

How do you debug android platform source code?

When you have issues with android source code, how do you dig into the code? For example for this issue I saw from the debugger that the CookieManager is AwCookieManagerSo from Google search I found that the setCookie is the following:

74