Can JobScheduler In Doze Mode Can Connect Network?
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
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.
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View