Reputation: 1382
I am trying to make a GPS tracker app.
I don't intent to distribute this app in play store. So, I got full control of the device(and can do manually whitelist).
I would like to know if:
Upvotes: 3
Views: 923
Reputation: 24917
Question 1:
Would doze mode be activated if charger is always connected to phone?
No.
As soon as the user wakes the device by moving it, turning on the screen, or connecting a charger, the system exits Doze and all apps return to normal activity.
Question 2:
Would sudden jerk or vibration to phone disables doze mode after a prolonged inactivity? For example,consider phone placed inside a truck and would that vibration (from engine start or travelling) be sufficient to get the device from doze to normal mode?
Prior to Android N, Yes. From Android N, no.
Android 7.0 brings further enhancements to Doze by applying a subset of CPU and network restrictions while the device is unplugged with the screen turned off, but not necessarily stationary, for example, when a handset is traveling in a user’s pocket.
Question 3
Will job scheduler service work in doze mode with scheduled app manually whitelisted (including GPS and network)?
No.
An app that is whitelisted can use the network and hold partial wake locks during Doze and App Standby. However, other restrictions still apply to the whitelisted app, just as they do to other apps. For example, the whitelisted app’s jobs and syncs are deferred (on API level 23 and below), and its regular AlarmManager alarms do not fire.
Question 4
Would phone call to doze mode device changes its state to normal mode?
Yes. Due to same reason as Question 1.
Question 5
Would sensors like gyro, accelerometer work in doze mode?
Might not work in Doze mode
For more details on Optimizations in Doze mode, you can refer this document.
Upvotes: 2